How to Sort files and folders by size
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
Comments
One Response to “How to Sort files and folders by size”
Leave a Reply
You must be logged in to post a comment.
Doesn’t work!
do this: # du -sh * | sort -n