how do you sort du output by size?
I have a text file generated from the output of
du --max-depth 1 -h > sizeOfHomeFolder.txt
It's contents are in this format:
$ cat sizeOfHomeFolder.txt | head 776K ./Expensemanager 8.0K ./workspace 4.0M ./mysql-tutorial 3.6M ./temp 26M ./Desktop 4.0K ./Ubuntu One 4.0K ./Photos 4.0K ./Public
I need to sort this file based on 1st column i.e. the size.
How to do this with the help of
sed or any other common unix utility ?