Skip to main content
Kill -9 Club
Sign in

sort

TextPackage: coreutils

Sorts lines. sort -h understands du -h sizes, sort -n numbers, and with no option the sort is alphabetical — where 10 comes before 9.

What its options do in the lessons

From the same glossary the lessons render under their commands, so the two cannot disagree.

sort -n
Sorts numerically rather than alphabetically (10 after 9).
sort -h
Sorts human-readable sizes (2K, 1G) into the right order.
sort -r
Descending order.

Lessons that teach it