How do we make sense of this find command? [duplicate]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite













This question already has an answer here:



  • Understanding the -exec option of `find`

    1 answer



find /path/to/wordpress -type f -exec chmod 664 ; 


It seems that it find stuffs whose type is file and then exec chmod



What does and and ; is for?










share|improve this question















marked as duplicate by Kusalananda, Michael Homer, Thomas, Romeo Ninov, dr01 Sep 13 at 11:54


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


















    up vote
    0
    down vote

    favorite













    This question already has an answer here:



    • Understanding the -exec option of `find`

      1 answer



    find /path/to/wordpress -type f -exec chmod 664 ; 


    It seems that it find stuffs whose type is file and then exec chmod



    What does and and ; is for?










    share|improve this question















    marked as duplicate by Kusalananda, Michael Homer, Thomas, Romeo Ninov, dr01 Sep 13 at 11:54


    This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite












      This question already has an answer here:



      • Understanding the -exec option of `find`

        1 answer



      find /path/to/wordpress -type f -exec chmod 664 ; 


      It seems that it find stuffs whose type is file and then exec chmod



      What does and and ; is for?










      share|improve this question
















      This question already has an answer here:



      • Understanding the -exec option of `find`

        1 answer



      find /path/to/wordpress -type f -exec chmod 664 ; 


      It seems that it find stuffs whose type is file and then exec chmod



      What does and and ; is for?





      This question already has an answer here:



      • Understanding the -exec option of `find`

        1 answer







      find






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Sep 13 at 9:20









      Kusalananda

      107k14209331




      107k14209331










      asked Sep 13 at 9:07









      J. Chang

      3,221204974




      3,221204974




      marked as duplicate by Kusalananda, Michael Homer, Thomas, Romeo Ninov, dr01 Sep 13 at 11:54


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






      marked as duplicate by Kusalananda, Michael Homer, Thomas, Romeo Ninov, dr01 Sep 13 at 11:54


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          3
          down vote













          simply means the file returned by find, while ; it's the terminator.



          Please keep in mind that ; means "execute the command for each file returned by find".



          In your case



          find /path/to/wordpress -type f -exec chmod 664 ; 


          means "execute chmod 664 on each file found under /path/to/wordpress.



          For example, if you have



          /path/to/wordpress/file1
          /path/to/wordpress/file2
          /path/to/wordpress/file3


          the result is equivalento to call chmod three times:



          chmod 664 /path/to/wordpress/file1
          chmod 664 /path/to/wordpress/file2
          chmod 664 /path/to/wordpress/file3


          You can also terminate the command with +, which passes every file found as arguments for the command.



          With the example above, find /path/to/wordpress -type f -exec chmod 664 + is equivalent to a single chmod:



          chmod 664 /path/to/wordpress/file1 /path/to/wordpress/file2 /path/to/wordpress/file3





          share|improve this answer




















          • I see and doing it with ; means doing it 3 times
            – J. Chang
            Sep 13 at 9:16










          • @J.Chang well, it meas do it for each file, it's 3 times because there are 3 files in the example. If there are 1000 files, it will do it 1000 times ;)
            – Mr Shunz
            Sep 13 at 9:26

















          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          3
          down vote













          simply means the file returned by find, while ; it's the terminator.



          Please keep in mind that ; means "execute the command for each file returned by find".



          In your case



          find /path/to/wordpress -type f -exec chmod 664 ; 


          means "execute chmod 664 on each file found under /path/to/wordpress.



          For example, if you have



          /path/to/wordpress/file1
          /path/to/wordpress/file2
          /path/to/wordpress/file3


          the result is equivalento to call chmod three times:



          chmod 664 /path/to/wordpress/file1
          chmod 664 /path/to/wordpress/file2
          chmod 664 /path/to/wordpress/file3


          You can also terminate the command with +, which passes every file found as arguments for the command.



          With the example above, find /path/to/wordpress -type f -exec chmod 664 + is equivalent to a single chmod:



          chmod 664 /path/to/wordpress/file1 /path/to/wordpress/file2 /path/to/wordpress/file3





          share|improve this answer




















          • I see and doing it with ; means doing it 3 times
            – J. Chang
            Sep 13 at 9:16










          • @J.Chang well, it meas do it for each file, it's 3 times because there are 3 files in the example. If there are 1000 files, it will do it 1000 times ;)
            – Mr Shunz
            Sep 13 at 9:26














          up vote
          3
          down vote













          simply means the file returned by find, while ; it's the terminator.



          Please keep in mind that ; means "execute the command for each file returned by find".



          In your case



          find /path/to/wordpress -type f -exec chmod 664 ; 


          means "execute chmod 664 on each file found under /path/to/wordpress.



          For example, if you have



          /path/to/wordpress/file1
          /path/to/wordpress/file2
          /path/to/wordpress/file3


          the result is equivalento to call chmod three times:



          chmod 664 /path/to/wordpress/file1
          chmod 664 /path/to/wordpress/file2
          chmod 664 /path/to/wordpress/file3


          You can also terminate the command with +, which passes every file found as arguments for the command.



          With the example above, find /path/to/wordpress -type f -exec chmod 664 + is equivalent to a single chmod:



          chmod 664 /path/to/wordpress/file1 /path/to/wordpress/file2 /path/to/wordpress/file3





          share|improve this answer




















          • I see and doing it with ; means doing it 3 times
            – J. Chang
            Sep 13 at 9:16










          • @J.Chang well, it meas do it for each file, it's 3 times because there are 3 files in the example. If there are 1000 files, it will do it 1000 times ;)
            – Mr Shunz
            Sep 13 at 9:26












          up vote
          3
          down vote










          up vote
          3
          down vote









          simply means the file returned by find, while ; it's the terminator.



          Please keep in mind that ; means "execute the command for each file returned by find".



          In your case



          find /path/to/wordpress -type f -exec chmod 664 ; 


          means "execute chmod 664 on each file found under /path/to/wordpress.



          For example, if you have



          /path/to/wordpress/file1
          /path/to/wordpress/file2
          /path/to/wordpress/file3


          the result is equivalento to call chmod three times:



          chmod 664 /path/to/wordpress/file1
          chmod 664 /path/to/wordpress/file2
          chmod 664 /path/to/wordpress/file3


          You can also terminate the command with +, which passes every file found as arguments for the command.



          With the example above, find /path/to/wordpress -type f -exec chmod 664 + is equivalent to a single chmod:



          chmod 664 /path/to/wordpress/file1 /path/to/wordpress/file2 /path/to/wordpress/file3





          share|improve this answer












          simply means the file returned by find, while ; it's the terminator.



          Please keep in mind that ; means "execute the command for each file returned by find".



          In your case



          find /path/to/wordpress -type f -exec chmod 664 ; 


          means "execute chmod 664 on each file found under /path/to/wordpress.



          For example, if you have



          /path/to/wordpress/file1
          /path/to/wordpress/file2
          /path/to/wordpress/file3


          the result is equivalento to call chmod three times:



          chmod 664 /path/to/wordpress/file1
          chmod 664 /path/to/wordpress/file2
          chmod 664 /path/to/wordpress/file3


          You can also terminate the command with +, which passes every file found as arguments for the command.



          With the example above, find /path/to/wordpress -type f -exec chmod 664 + is equivalent to a single chmod:



          chmod 664 /path/to/wordpress/file1 /path/to/wordpress/file2 /path/to/wordpress/file3






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Sep 13 at 9:13









          Mr Shunz

          2,65811720




          2,65811720











          • I see and doing it with ; means doing it 3 times
            – J. Chang
            Sep 13 at 9:16










          • @J.Chang well, it meas do it for each file, it's 3 times because there are 3 files in the example. If there are 1000 files, it will do it 1000 times ;)
            – Mr Shunz
            Sep 13 at 9:26
















          • I see and doing it with ; means doing it 3 times
            – J. Chang
            Sep 13 at 9:16










          • @J.Chang well, it meas do it for each file, it's 3 times because there are 3 files in the example. If there are 1000 files, it will do it 1000 times ;)
            – Mr Shunz
            Sep 13 at 9:26















          I see and doing it with ; means doing it 3 times
          – J. Chang
          Sep 13 at 9:16




          I see and doing it with ; means doing it 3 times
          – J. Chang
          Sep 13 at 9:16












          @J.Chang well, it meas do it for each file, it's 3 times because there are 3 files in the example. If there are 1000 files, it will do it 1000 times ;)
          – Mr Shunz
          Sep 13 at 9:26




          @J.Chang well, it meas do it for each file, it's 3 times because there are 3 files in the example. If there are 1000 files, it will do it 1000 times ;)
          – Mr Shunz
          Sep 13 at 9:26


          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?