Jul
27
How to Sort files and folders by size
Posted by suvi under Tricks
If you want to Sort your files and folders by size use the following tip
You need to open terminal use the following command
ls -lS –block-size=1 | awk ‘ {print $5,$6,$7,$8}’ >size.txt; du -s –block-size=1 */ >>size.txt; sort -n size.txt
or
{ ls -lS –block-size=1 | awk ‘ {print $5,$6,$7,$8}’; du -s –block-size=1 */ ; } | sort -nr | less
Leave a Reply