Numericaly sort file. Fields are separated by :. Use key in position 2: sort -n -k2 -t : /etc/password Sort by size of directories/files: du -h | sort -n