Difference between revisions of "Unix find"

From Rizzo_Lab
Jump to: navigation, search
 
Line 4: Line 4:
 
Find those PBS out and error files and delete them
 
Find those PBS out and error files and delete them
 
  find -name "*.[oe][0-9]*" | xargs rm
 
  find -name "*.[oe][0-9]*" | xargs rm
 +
 +
==References==
 +
http://www.softpanorama.org/Tools/Find/find_mini_tutorial.shtml

Latest revision as of 21:38, 28 July 2009

Find files >2MB in all sub-directories (good for locating space hogs)

find . -type f -size +2048k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'

Find those PBS out and error files and delete them

find -name "*.[oe][0-9]*" | xargs rm

References

http://www.softpanorama.org/Tools/Find/find_mini_tutorial.shtml