Reshared post from +nixCraft

Want to list the top 10 files eating disk space on a Linux/Unix/BSD/OSX oses? Try:

find . -type f -exec wc -c {} ; | sort -nr | head 

See man pages find, sort, head, and xargs for more usage 🙂

#Sysadmin   #Server   #Disks   #Unix   #Linux  

Post imported by Google+Blog for WordPress.

6 thoughts on “Want to list the top 10 files eating disk space on a Linux/Unix/BSD/OSX oses? Tr…

  1. I used 'du -sk *|sort -nr' religiously since admining circa. 1992.

    I had it scripted weekly and ran it on user accounts. (I did not believe in hard space limits and did not enforce any, but did warn users what unwittingly may have used too much)

Leave a Reply