List top 10 largest files and directories

The following command chain will output a list of the top 10 largest files and directories in the current directory. Change the dot to a directory location to search in some other directory.

du -a . | sort -n -r | head -n 10

You'll get a list something like the following:

73302534        .
39699826        ./stage4
19417508        ./stage4/localhost-stage4-2007-05-11.tar.bz2.des3
18587964        ./stage4/home
11909234        ./bn
9440927 ./shared
5148067 ./stage4/home/steph
5125000 ./stage4/home/steph.img
5125000 ./stage4/home/bn.img
4198400 ./shared/shared-2007-05-11.2.dar


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


Last modified: 12/02/2008 Tags: (none)

This website is a personal resource. Nothing here is guaranteed correct or complete, so use at your own risk and try not to delete the Internet. -Stephan

Site Info

Privacy policy

Go to top