Show file size of all files and folders in a directory and sort them from smallest to largest


du ./ -h --max-depth=1 | sort -h

Example output:

56K     ./.subversion
100K    ./autoremove-attachments
116K    ./skgRnh
120K    ./ioping-0.6
124K    ./mysqltuner-new
144K    ./.pip
228K    ./move-2013-07-29
436K    ./admin-block-country
668K    ./theme-cloc-test
1.5M    ./.vagrant.d
1.8M    ./rubygems-1.8.24
2.9M    ./mainwp-test

Leave a Reply

Your email address will not be published. Required fields are marked *

Markdown is allowed in comments.