Linux Command Directory
This directory of Linux commands is from Linux in a Nutshell, 5th Edition.
Click on any of the 687 commands below to get a description and list of available options. All links in the command summaries point to the online version of the book on Safari Bookshelf.
pr [options] [files]
Convert a text file or files to a paginated or columned version, with headers, suitable for printing. If - is provided as the filename, read from standard input.
Begin printing on page beg_pag and end on end-pag if specified.
Print in num_cols number of columns, balancing the number of lines in the columns on each page.
Print columns horizontally, not vertically.
Convert control characters to hat notation (such as ^C), and other unprintable characters to octal backslash format.
Format the header date using format. See the date command for the possible formats.
Convert tabs (or tab-chars) to spaces. If width is specified, convert tabs to width characters (default is 8).
Separate pages with form feeds, not newlines. With -F, print a three-line page header; otherwise print a five-line header and trailer.
Use header for the header instead of the filename.
Print a help message and then exit.
Replace spaces with tabs on output. Can specify alternative tab character (default is tab) and width (default is 8).
Merge full lines; ignore -W if set.
Set page length to lines (default is 66). If lines is less than 10, omit headers and footers. Thus the default number of lines of text (i.e., not header or trailer) is 56, or 63 with -F.
Print all files, one per column.
Number columns, or, with the -m option, number lines. Append delimiter to each number (default is a tab) and limit the size of numbers to digits (default is 5).
Start counting with num at the first line of the first page printed. Also see +beg_page.
Set left margin to width. Does not affect the page width set with -w or -W.
Continue silently when unable to open an input file.
Separate columns with the single-character delimiter (default is a tab) instead of spaces.
Separate columns with string. Default is a tab with -J and a space otherwise.
Suppress headers, footers, and fills at end of pages.
Like -t but also suppress form feeds.
Convert unprintable characters to octal backslash format.
Set the page width to page_width characters for multicolumn output. Default is 72.
Set the page width to always be page_width characters. Lines longer than the specified width are truncated unless -J is also specified. Default is 72.
Print version information and then exit.