Linux Commands Reference - Complete Linux Command Guide

Comprehensive Linux command reference with 150+ commands. Search, filter by category, and view detailed usage examples.

Share
Back to commands

sort

Sort lines of text

Syntax

sort [OPTION]... [FILE]...

Common Options

-rReverse order
-nNumeric sort
-kSort by column
-uUnique only
-tField separator

Common Examples

sort file.txt

Alphabetical sort

sort -n numbers.txt

Numeric sort

sort -k 2 file.txt

Sort by column 2

Related Commands

Related Tools

More Code & Dev Tools