Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
shell:find [2020/01/23 17:37] – [find] tmadeshell:find [2020/04/08 16:50] – [find] tmade
Line 16: Line 16:
   find /sourcedirectory -mtime +30 -exec mv "{}" /destination/directory/ \;  #Moves files older 30 days from sourcedirectory to destination   find /sourcedirectory -mtime +30 -exec mv "{}" /destination/directory/ \;  #Moves files older 30 days from sourcedirectory to destination
   find . -name "*.bak" -type f -print0 | xargs -0 /bin/rm -f                 #Delete all files called "*.bak" recursivly from workingdirectory   find . -name "*.bak" -type f -print0 | xargs -0 /bin/rm -f                 #Delete all files called "*.bak" recursivly from workingdirectory
-  find /somedir -type f -exec chmod 666 {} \;                                #Find files in "/somedir" and chmod to 666 +  find /somedir -type f -exec chmod 644 {} \;                                #Find files in "/somedir" and chmod to 644 
-  find . -type f -print0 | xargs -0 chmod 666                                #Find files in "/somedir" and chmod to 666+  find . -type d -exec chmod 775 {} \;                                       #Find folder in "." and change to 775 
 +  find . -type f -print0 | xargs -0 chmod 666                                #Find files in "." and chmod to 666
shell/find.txt · Last modified: 2024/03/21 14:09 by tmade
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki