Useful Snippets

Welcome!


This blog is used to collect useful snippets related to Linux, PHP, MySQL and more. Feel free to post comments with improvements or questions!

Are your smart devices spying on you? Make better purchasing choices and find products that respect your privacy at Unwanted.cloud

RSS Latest posts from my personal blog


Subscribe to RSS feed


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

Stanislav KhromovStanislav Khromov

Command:

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

Full-stack impostor syndrome sufferer & Software Engineer at Schibsted Media Group

Comments 0
There are currently no comments.