PTX(1) User Commands PTX(1)

# [NAME](#NAME)

ptx - produce a permuted index of file contents

# [SYNOPSIS](#SYNOPSIS)

**ptx** \[*OPTION*]... \[*INPUT*]... *(without -G)*  
**ptx** *-G* \[*OPTION*]... \[*INPUT* \[*OUTPUT*]]

# [DESCRIPTION](#DESCRIPTION)

Output a permuted index, including context, of the words in the input files.

With no FILE, or when FILE is -, read standard input.

Mandatory arguments to long options are mandatory for short options too.

[**-A, --auto-reference**](#A,)

output automatically generated references

[**-G, --traditional**](#G,)

behave more like System V 'ptx'

[**-F, --flag-truncation=STRING**](#F,)

use STRING for flagging line truncations. The default is '/'

[**-M, --macro-name=STRING**](#M,)

macro name to use instead of 'xx'

[**-O, --format=roff**](#O,)

generate output as roff directives

[**-R, --right-side-refs**](#R,)

put references at right, not counted in **-w**

[**-S, --sentence-regexp=REGEXP**](#S,)

for end of lines or end of sentences

[**-T, --format=tex**](#T,)

generate output as TeX directives

[**-W, --word-regexp=REGEXP**](#W,)

use REGEXP to match each keyword

[**-b, --break-file=FILE**](#b,)

word break characters in this FILE

[**-f, --ignore-case**](#f,)

fold lower case to upper case for sorting

[**-g, --gap-size=NUMBER**](#g,)

gap size in columns between output fields

[**-i, --ignore-file=FILE**](#i,)

read ignore word list from FILE

[**-o, --only-file=FILE**](#o,)

read only word list from this FILE

[**-r, --references**](#r,)

first field of each line is a reference

[**-t, --typeset-mode**](#t,)

change the default width from 72 to 100

[**-w, --width=NUMBER**](#w,)

output width in columns, reference excluded

[**--help**](#help)

display this help and exit

[**--version**](#version)

output version information and exit

# [AUTHOR](#AUTHOR)

Written by F. Pinard.

# [REPORTING BUGS](#REPORTING_BUGS)

Report bugs to: &lt;bug-coreutils@gnu.org&gt;.  
Report any translation bugs to: &lt;https://translationproject.org/team/&gt;.  
GNU coreutils home page: &lt;https://www.gnu.org/software/coreutils/&gt;  
General help using GNU software: &lt;https://www.gnu.org/gethelp/&gt;

# [COPYRIGHT](#COPYRIGHT)

Copyright © 2026 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later &lt;https://gnu.org/licenses/gpl.html&gt;.  
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

# [SEE ALSO](#SEE_ALSO)

Full documentation &lt;https://www.gnu.org/software/coreutils/ptx&gt;  
or available locally via: info '(coreutils) ptx invocation'

September 2026 GNU coreutils 9.12

---

Document: ptx(1) from coreutils 9.12-r3 (Chainguard OS)
Source: https://git.savannah.gnu.org/git/coreutils.git
