The du (i.e., disk usage) command reports the sizes of directory trees inclusive of all of their contents and the sizes of individual files:

-h, –human-readable
print sizes in human readable format (e.g., 1K 234M 2G)

-s, –summarize
display only a total for each argument

-x, –one-file-system
skip directories on different file systems

The sort command sorts the standard input to standard output:

-r, –reverse
reverse the result of comparisons

-h, –human-numeric-sort
compare human readable numbers (e.g., 2K 1G)

The head command print the first 10 lines of standard input to standard output.

$ cd /path/to/some/where
$ du -hsx * | sort -rh | head -10

Leave a Reply

Your email address will not be published.