How to find the largest directories or largest files? [duplicate]

Solution 1:

From any directory:

du -a | sort -n -r

Solution 2:

A utility called ncdu will give you the information you are looking for.

sudo apt-get install ncdu

On OS X, it can be installed using Homebrew:

brew install ncdu