Technology Blog

List (LS) top biggest files or folders on linux file system

by on Sep.27, 2012, under Uncategorized

This command will list out the top biggest files or directories on the server.

resize; clear; date; echo "Largest Directories:"; du -hcx / | grep '^[0-9]*G'\
| sort -nr | head; echo ""; echo "Largest Files:"; nice -n 19 find / -mount \
-type f -ls|sort -rnk7 |head -10|awk '{printf "%d MB\t%s\n",($7/1024)/1024,$NF}'
Be Sociable, Share!

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...