Linux 4 All

Best Linux tricks source

A little “find and sort” magic to find largest 50 files on a server:

find / -type f -size '+1024k' -printf "%s %h/%f\n" | \
sort -rn -k1 | \
head -n50 | \
awk '{ printf("%5dMB\t%s\n", $1/1048576, substr($0, index($0, " ")+1, length($0))) }' 

Find all files bigger than a certain size arrow-right
Next post

arrow-left How to run Apache with mod_fastcgi and php-fpm
Previous post

Leave a Reply

Your email address will not be published. Required fields are marked *