This commit is contained in:
James Zhu 2014-10-04 22:13:33 +08:00
parent 1b65674318
commit 7e62c79dac

View File

@ -20,7 +20,7 @@ find ./path/ -name '*.txt' -exec rm '{}' \;
find ./path/ -name '*.txt' | xargs grep 'string' find ./path/ -name '*.txt' | xargs grep 'string'
# To find files with size bigger than 5 Mb and sort them by size: # To find files with size bigger than 5 Mb and sort them by size:
find ./ -size +5M -type f -print0 | xargs -0 ls -Ssh find /var -size +5M -type f -ls |sort -rn -k7,7|head
# To find files bigger thank 2 MB and list them: # To find files bigger thank 2 MB and list them:
find / -type f -size +20000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }' find / -type f -size +20000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'