How to easily list all directories and sort them by size on Linux
If you run ls -lh and wonder why every directory shows 4.0K, you are looking at the directory entry itself, not what lives inside the tree. du reads what is underneath. Why ls cannot sort directories by size ls reads directory metadata, so ls -S sorts regular files correctly while directories stay at their inode
How to easily list all directories and sort them by size on Linux Read More »