Disk usage sorted by file size

The following shell command runs the ‘du’ command to a max folder depth of 1, and then pipes the output to ‘sort’, and the finally writes it ‘du_log’.

$ du -h --max-depth=1 | sort -n -r > du_log
Advertisements