What does newermt mean in find command?












8















I know I can use this option to find file between particular modified times. But I'm curious about what does this mean?



I used man find | grep newermt trying to find something. But I got no direct content. It seems -newer file and mtime stuff may have relation with it. But I'm not sure..



So, what does -newermt actually mean?










share|improve this question





























    8















    I know I can use this option to find file between particular modified times. But I'm curious about what does this mean?



    I used man find | grep newermt trying to find something. But I got no direct content. It seems -newer file and mtime stuff may have relation with it. But I'm not sure..



    So, what does -newermt actually mean?










    share|improve this question



























      8












      8








      8


      3






      I know I can use this option to find file between particular modified times. But I'm curious about what does this mean?



      I used man find | grep newermt trying to find something. But I got no direct content. It seems -newer file and mtime stuff may have relation with it. But I'm not sure..



      So, what does -newermt actually mean?










      share|improve this question
















      I know I can use this option to find file between particular modified times. But I'm curious about what does this mean?



      I used man find | grep newermt trying to find something. But I got no direct content. It seems -newer file and mtime stuff may have relation with it. But I'm not sure..



      So, what does -newermt actually mean?







      command-line find






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 25 '14 at 12:31









      slm

      250k66526683




      250k66526683










      asked Nov 25 '14 at 4:40









      ZenZen

      2,272103054




      2,272103054






















          2 Answers
          2






          active

          oldest

          votes


















          16














          find(1):



          -newerXY reference
          Compares the timestamp of the current file with reference. The
          reference argument is normally the name of a file (and one of
          its timestamps is used for the comparison) but it may also be a
          string describing an absolute time. X and Y are placeholders
          for other letters, and these letters select which time belonging
          to how reference is used for the comparison.

          a The access time of the file reference
          B The birth time of the file reference
          c The inode status change time of reference
          m The modification time of the file reference
          t reference is interpreted directly as a time





          share|improve this answer































            7














            find ./ -mtime +n used to get all files older than n days
            find ./ -mtime -n used to get all files modified in last n days

            Now if you are using 1 in place of n, you will get files modified in the last 24 hours. But what if you want only files from yesterday and not within the last 24 hours? Here newermt comes into the picture.



            find ./ -newermt "2016-01-18" ! -newermt '2016-01-19'


            will give you all files which are newer than specified date and ! will exclude all files which are newer than the specified date. So the above command will give a list of files which were modified on 2016-01-18.






            share|improve this answer

























              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "106"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: false,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f169798%2fwhat-does-newermt-mean-in-find-command%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              16














              find(1):



              -newerXY reference
              Compares the timestamp of the current file with reference. The
              reference argument is normally the name of a file (and one of
              its timestamps is used for the comparison) but it may also be a
              string describing an absolute time. X and Y are placeholders
              for other letters, and these letters select which time belonging
              to how reference is used for the comparison.

              a The access time of the file reference
              B The birth time of the file reference
              c The inode status change time of reference
              m The modification time of the file reference
              t reference is interpreted directly as a time





              share|improve this answer




























                16














                find(1):



                -newerXY reference
                Compares the timestamp of the current file with reference. The
                reference argument is normally the name of a file (and one of
                its timestamps is used for the comparison) but it may also be a
                string describing an absolute time. X and Y are placeholders
                for other letters, and these letters select which time belonging
                to how reference is used for the comparison.

                a The access time of the file reference
                B The birth time of the file reference
                c The inode status change time of reference
                m The modification time of the file reference
                t reference is interpreted directly as a time





                share|improve this answer


























                  16












                  16








                  16







                  find(1):



                  -newerXY reference
                  Compares the timestamp of the current file with reference. The
                  reference argument is normally the name of a file (and one of
                  its timestamps is used for the comparison) but it may also be a
                  string describing an absolute time. X and Y are placeholders
                  for other letters, and these letters select which time belonging
                  to how reference is used for the comparison.

                  a The access time of the file reference
                  B The birth time of the file reference
                  c The inode status change time of reference
                  m The modification time of the file reference
                  t reference is interpreted directly as a time





                  share|improve this answer













                  find(1):



                  -newerXY reference
                  Compares the timestamp of the current file with reference. The
                  reference argument is normally the name of a file (and one of
                  its timestamps is used for the comparison) but it may also be a
                  string describing an absolute time. X and Y are placeholders
                  for other letters, and these letters select which time belonging
                  to how reference is used for the comparison.

                  a The access time of the file reference
                  B The birth time of the file reference
                  c The inode status change time of reference
                  m The modification time of the file reference
                  t reference is interpreted directly as a time






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 25 '14 at 5:02









                  SailorCireSailorCire

                  1,8581921




                  1,8581921

























                      7














                      find ./ -mtime +n used to get all files older than n days
                      find ./ -mtime -n used to get all files modified in last n days

                      Now if you are using 1 in place of n, you will get files modified in the last 24 hours. But what if you want only files from yesterday and not within the last 24 hours? Here newermt comes into the picture.



                      find ./ -newermt "2016-01-18" ! -newermt '2016-01-19'


                      will give you all files which are newer than specified date and ! will exclude all files which are newer than the specified date. So the above command will give a list of files which were modified on 2016-01-18.






                      share|improve this answer






























                        7














                        find ./ -mtime +n used to get all files older than n days
                        find ./ -mtime -n used to get all files modified in last n days

                        Now if you are using 1 in place of n, you will get files modified in the last 24 hours. But what if you want only files from yesterday and not within the last 24 hours? Here newermt comes into the picture.



                        find ./ -newermt "2016-01-18" ! -newermt '2016-01-19'


                        will give you all files which are newer than specified date and ! will exclude all files which are newer than the specified date. So the above command will give a list of files which were modified on 2016-01-18.






                        share|improve this answer




























                          7












                          7








                          7







                          find ./ -mtime +n used to get all files older than n days
                          find ./ -mtime -n used to get all files modified in last n days

                          Now if you are using 1 in place of n, you will get files modified in the last 24 hours. But what if you want only files from yesterday and not within the last 24 hours? Here newermt comes into the picture.



                          find ./ -newermt "2016-01-18" ! -newermt '2016-01-19'


                          will give you all files which are newer than specified date and ! will exclude all files which are newer than the specified date. So the above command will give a list of files which were modified on 2016-01-18.






                          share|improve this answer















                          find ./ -mtime +n used to get all files older than n days
                          find ./ -mtime -n used to get all files modified in last n days

                          Now if you are using 1 in place of n, you will get files modified in the last 24 hours. But what if you want only files from yesterday and not within the last 24 hours? Here newermt comes into the picture.



                          find ./ -newermt "2016-01-18" ! -newermt '2016-01-19'


                          will give you all files which are newer than specified date and ! will exclude all files which are newer than the specified date. So the above command will give a list of files which were modified on 2016-01-18.







                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Jan 26 at 13:28









                          abcd

                          32




                          32










                          answered Jan 18 '16 at 12:26









                          user152041user152041

                          7111




                          7111






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Unix & Linux Stack Exchange!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f169798%2fwhat-does-newermt-mean-in-find-command%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              How to make a Squid Proxy server?

                              Is this a new Fibonacci Identity?

                              19世紀