SORT(1)

๐Ÿ“ฆ version 0.12.0, in arch rolling

SORT(1) ๐Ÿ’…

okay so this is the General Commands Manual page for SORT(1), and Iโ€™m gonna make it make sense, bestie. ๐Ÿซถ


โœจ NAME โœจ

sort โ€” displays the sorted concatenation of all FILE(s). With no FILE, or when FILE is -, it reads standard input. slay. ๐Ÿ’–

๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

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

๐ŸŒธ DESCRIPTION ๐ŸŒธ

Same energy as NAME, but with room to breathe: sort displays the sorted concatenation of all FILE(s). With no FILE, or when FILE is -, it reads standard input. no cap. โœจ

๐Ÿ’… OPTIONS ๐Ÿ’…

  • --help โ€” print help information. iconic. ๐ŸŽ€
  • --version โ€” print version information. ๐ŸŒธ
  • --sort โ€” okay so this one picks the sort vibe. Possible values:
    • general-numeric
    • human-numeric
    • month
    • numeric
    • version
    • random
  • -h, --human-numeric-sort โ€” compares according to human-readable sizes, like 1M > 100k, bestie. ๐Ÿ’…
  • -M, --month-sort โ€” compares according to month name abbreviation. ๐Ÿ—“๏ธ
  • -n, --numeric-sort โ€” compares according to string numerical value. ๐Ÿ”ข
  • -g, --general-numeric-sort โ€” compares according to string general numerical value. ๐Ÿงฎ
  • -V, --version-sort โ€” sorts by SemVer version number, like 1.12.2 > 1.1.2. ๐Ÿฆ‹
  • -R, --random-sort โ€” shuffles in random order. chaotic, love that. ๐Ÿ’€
  • --random-source <FILE> โ€” uses FILE as a source of random data. ๐ŸŽฒ
  • -d, --dictionary-order โ€” considers only blanks and alphanumeric characters. ๐Ÿ“
  • -m, --merge โ€” merges already sorted files; does not sort. ๐Ÿ’–
  • -c, --check โ€” checks for sorted input; does not sort. Possible values:
    • silent
    • quiet
    • diagnose-first
  • -C, --check-silent โ€” exits successfully if the given file is already sorted, and exits with status 1 otherwise. vibe check, but make it exit-code. โœจ
  • -f, --ignore-case โ€” folds lower case to upper case characters. ๐ŸŽ€
  • -i, --ignore-nonprinting โ€” ignores nonprinting characters. ๐Ÿ™ˆ
  • -b, --ignore-leading-blanks โ€” ignores leading blanks when finding sort keys in each line. ๐ŸŒธ
  • -o, --output <FILENAME> โ€” writes output to FILENAME instead of stdout. ๐Ÿซถ
  • -r, --reverse โ€” reverses the output. ๐Ÿ’…
  • -s, --stable โ€” stabilizes sort by disabling last-resort comparison. bestie behavior. ๐Ÿ’–
  • -u, --unique โ€” outputs only the first of an equal run. one of each, periodt. ๐Ÿ‘‘
  • -k, --key โ€” sorts by a key. ๐Ÿ”‘
  • -t, --field-separator โ€” custom separator for -k. โœ‚๏ธ
  • -z, --zero-terminated โ€” line delimiter is NUL, not newline. ๐ŸŒˆ
  • --parallel <NUM_THREADS> โ€” changes the number of threads running concurrently to NUM_THREADS. โšก
  • -S, --buffer-size <SIZE> โ€” sets the maximum SIZE of each segment in number of sorted items. ๐ŸŽ€
  • -T, --temporary-directory <DIR> โ€” uses DIR for temporaries, not $TMPDIR or /tmp. ๐Ÿ“
  • --compress-program <PROG> โ€” compresses temporary files with PROG, decompresses with PROG -d; PROG has to take input from stdin and output to stdout. ๐Ÿงš
  • --batch-size <N_MERGE> โ€” merges at most N_MERGE inputs at once. ๐Ÿ’œ
  • --files0-from <NUL_FILE> โ€” reads input from the files specified by NUL-terminated NUL_FILE. ๐Ÿฆ‹
  • --debug โ€” underlines the parts of the line that are actually used for sorting. main character energy. โญ
  • [files] โ€” the FILE arguments go here, bestie. ๐Ÿ’–

๐ŸŽ€ EXTRA ๐ŸŽ€

okay so the key format is literally:

FIELD[.CHAR][OPTIONS][,FIELD[.CHAR]][OPTIONS]

Fields by default are separated by the first whitespace after a non-whitespace character. Use -t to specify a custom separator. In the default case, whitespace is appended at the beginning of each field. Custom separators however are not included in fields. ๐Ÿ’…

FIELD and CHAR both start at 1 (i.e. they are 1-indexed). If there is no end specified after a comma, the end will be the end of the line. If CHAR is set 0, it means the end of the field. CHAR defaults to 1 for the start position and to 0 for the end position. ๐ŸŒธ

Valid options are: MbdfhnRrV. They override the global options for this key. no cap. โœจ

๐ŸŒˆ VERSION ๐ŸŒˆ

This build is v(uutils coreutils) 0.12.0, bestie. ๐Ÿ’–

xoxo, your SORT(1) bestie โ€” v(uutils coreutils) 0.12.0, dated 2026-09-17, bye ๐Ÿซถ๐Ÿ’‹

๐Ÿ“ฆ where this page comes from