There are many ways on how to do it. You could use awk or perl but I like just using linux built-in tools. Will be giving two examples that I usually use.
1. use du and sort with the -g flag: result would be displayed in ascending order according to size
eg: du * | sort -g
2. use du combined with sort, cut and xargs
eg: du -ks * | sort -nr | cut -f2 | xargs -d '\n' du -sh
I like the second option as the result is more in human readable format.