Find the largest files or directories in Linux

Writing by on Wednesday, 25 of February , 2015 at 8:32 am

Running out of space? To find the biggest files or folders in your Linux environment in descending order, switch to the root folder and then run the du command.

cd /
du -Sh | sort -rh | head -n 20

Mac equivalent is something like

find . -type f -print0 | xargs -0 ls -l | sort -k5,5rn

Leave a comment

Category: Linux

No Comments

No comments yet.

Leave a comment

You must be logged in to post a comment.

Shivdev Kalambi's Blog

Shivdev Kalambi is a Software Development Manager, previously a Principal Software Engineer at ArcSight/HP. With over 16 years' experience in software development, he's worked on several technologies and played different roles and contributed to all phases of projects. Non-tech activies include Ping-pong, Rock Climbing and Yoga at PG, Golf, Skiing, Swimming & a beer enthusiast.