Difference between revisions of "Unix find"
From Rizzo_Lab
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 |
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