Let's sort output of ls - first 20 lines, 5th column - by file size, numerically:
ls -l /etc/ | head -n 20 | sort -k 5n
ls -l /etc/ | head -n 20 | sort -k 6M