How do I find the largest top 10 files and directories on a Linux / UNIX / BSD filesystem

May 14, 2012 12:31

http://www.cyberciti.biz/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem/

du -hsx * | sort -rh | head -5

du -hsx * | sort -rh | head -10

du -hsx * | sort -rh >/tmp/out.txt

for i in G M K; do du -ah | grep [0-9]$i | sort -nr -k 1; done | head -n 11

du --max-depth=1 -h | sort -rh | head -5

Previous post Next post
Up