PTX(1)

๐Ÿ’– PTX โ€” like, the permuted index queen ๐Ÿ’–

okay so bestie, welcome to ptx from the General Commands Manual (yes that's the manual name, we're fancy here). This is the girl who makes a permuted index out of your file contents, and she eats every single time. ๐Ÿ“


โœจ NAME โœจ

ptx โ€” Produce a permuted index of file contents. Output a permuted index, including context, of the words in the input files. Mandatory arguments to long options are mandatory for short options too. With no FILE, or when FILE is -, read standard input. Default is -F /. ๐Ÿ’…

No cap, that's the whole vibe. She's out here indexing your words with their lil context, and she's not gonna let you forget that long-option arguments apply to short options too. Periodt.


๐ŸŒธ SYNOPSIS ๐ŸŒธ

ptx [OPTION]... [INPUT]...
ptx -G [OPTION]... [INPUT [OUTPUT]]
psst โ€” that second form? That's the -G traditional mode era, and she takes an OUTPUT too. iykyk.

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

Produce a permuted index of file contents. Output a permuted index, including context, of the words in the input files. Mandatory arguments to long options are mandatory for short options too. With no FILE, or when FILE is -, read standard input. Default is -F /.

fr fr, that's the entire description and it's iconic. She takes your input files, pulls out the words, and gives you the index but permuted, with context, which is giving very much "every word gets its main character moment". ๐Ÿ‘‘

And btw:

  • No FILE at all? She reads standard input. ๐Ÿซถ
  • FILE is literally -? Also standard input. Same energy.
  • The default is -F /. Noted. ๐Ÿ’…

๐ŸŽ€ OPTIONS ๐ŸŽ€

Every single one, bestie. Not skipping a single flag, that's the rule. ๐ŸŒˆ

  • -A, --auto-reference โ€” output automatically generated references โœจ
  • -G, --traditional โ€” behave more like System V ptx ๐Ÿ‘ต (she's going vintage, we love her for it)
  • -F, --flag-truncation <STRING> โ€” use STRING for flagging line truncations ๐Ÿšฉ
  • -M, --macro-name <STRING> โ€” macro name to use instead of xx ๐Ÿท๏ธ
  • -O โ€” generate output as roff directives ๐Ÿ“œ
  • -T โ€” generate output as TeX directives ๐Ÿงฎ
  • -R, --right-side-refs โ€” put references at right, not counted in -w โžก๏ธ (yes this matters, remember it)
  • -S, --sentence-regexp <REGEXP> โ€” for end of lines or end of sentences ๐Ÿ”š
  • -W, --word-regexp <REGEXP> โ€” use REGEXP to match each keyword ๐Ÿ”
  • -b, --break-file <FILE> โ€” word break characters in this FILE โœ‚๏ธ
  • -f, --ignore-case โ€” fold lower case to upper case for sorting ๐Ÿ” 
  • -g, --gap-size <NUMBER> โ€” gap size in columns between output fields โ†”๏ธ
  • -i, --ignore-file <FILE> โ€” read ignore word list from FILE ๐Ÿ™ˆ
  • -o, --only-file <FILE> โ€” read only word list from this FILE ๐Ÿ‘€
  • -r, --references โ€” first field of each line is a reference ๐Ÿ”—
  • -t, --typeset-mode โ€” change the default width from 72 to 100 ๐Ÿ“
  • -w, --width <NUMBER> โ€” output width in columns, reference excluded ๐Ÿ“
  • -h, --help โ€” Print help ๐Ÿ†˜
  • -V, --version โ€” Print version ๐Ÿ’ซ

โญ VERSION โญ

v(uutils coreutils) 0.12.0

๐Ÿ”ฅ EXAMPLES ๐Ÿ”ฅ

These are the receipts, bestie. Commands verbatim, character for character, no editing. Copy-paste away. ๐Ÿ’œ

Generate a permuted index where the first field of each line is an index reference:

ptx [-r|--references] path/to/file

Generate a permuted index with automatically generated index references:

ptx [-A|--auto-reference] path/to/file

Generate a permuted index with a fixed width:

ptx [-w|--width] width_in_columns path/to/file

Generate a permuted index with a list of filtered words:

ptx [-o|--only-file] path/to/filter path/to/file

Generate a permuted index with SYSV-style behaviors:

ptx [-G|--traditional] path/to/file

The examples are provided by the tldr-pages project <https://tldr.sh> under the CC BY 4.0 License. Please note that, as uutils is a work in progress, some examples might fail.

heads up bestie โ€” uutils is literally a work in progress, so some of these examples might justโ€ฆ not pop off. It's not you, it's the WIP. ๐Ÿ˜ญ

and that's the whole page, slay ๐Ÿ’–

This one's from uutils coreutils, version v(uutils coreutils) 0.12.0, dated 2026-09-25 โ€” so if you're reading this off that exact PTX(1) page, mwah, you found the right girl. ๐ŸŽ€ Go index something, queen. ๐Ÿฆ‹โœจ

๐Ÿ“ฆ where this page comes from