with the command
du -sh *I get the summary of files in MB,GB, etc. If I use
du -s * | sort -nk1I get the summary sort by size.
How I can get the summary sort by size in MB, GB, etc?
Edit
the OS is ubuntu
41 Answer
If you're using GNU sort, try the following:
du -sh * | sort -hk1,1