Difference between revisions of "Unix find"
From Rizzo_Lab
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
− | Find files >2MB in all sub-directories | + | 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 . -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 |
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