Skip to main content
4 of 4
Improved formatting. Minor fixes.
Pablo A
  • 3.2k
  • 1
  • 26
  • 46

This command will list the 15 largest in order:

du -xhS | sort -h | tail -n 15 

We use the -x flag to skip directories on separate file systems.

The -h on the du gives the output in human-readable format, sort -h can then arrange this in order.

The -S on the du command means the size of subdirectories is excluded.

You can change the number of the tail to see less or more. Super handy command.

alpha
  • 2k
  • 12
  • 21