Sort will order a file or standard input. You can choose which field to sort and can sort either alphabetically or numerically.
+i
-i
-t'c'
-b
-n
-r
-u
-f
- Merge upper and lowercase.
-d
- Dictionary order.
You can sort by number or name. To find the largest files,
sort the output of ls -s:
% sort +3 -t':' -n /etc/passwd Numerical sort on 4th field. % sort /etc/passwd Alphabetical sort. % ls -s | sort -n Numerical sort for large files.