lpr(1) lpr(1)NAME lpr - spools print requests to printers SYNOPSIS lpr [-# copies] [-C class] [-h] [-i [indent-cols]] [-J cover-title] [-l] [-m] [-p] [-P printer] [-r] [-s] [-T title] [-wpage-width] [file]... ARGUMENTS -#copies Specifies the number of copies to be printed of each of the named files. -C class Specifies a particular class of print job for routing to a particular class of printers. For example, lpr -C Postscript foo.c causes the file foo.c to be sent to a PostScript(Reg.)-class printer. file Specifies the name of the file to be sent to the printer. -h Suppresses the printing of the burst page. -i [indent-cols] Specifies the number of columns each line is indented from the left margin. If no argument is supplied, 8 space characters are printed before each line. -J cover-title Specifies how the job is identified on the cover page that appears before the print job. If this option is not specified, the name of the first file is used. -l Causes lpr to use a filter that allows control characters to be printed and suppresses page breaks. -m Sends mail upon completion. -p Causes lpr to use pr to format the files (equivalent to print). -P printer Specifies the name of the printer to which the job is sent. -r Removes the file upon completion of spooling or upon completion of printing (when used with the -s option). January 1992 1
lpr(1) lpr(1)-s Causes symbolic links to be created in the spooler directories to conserve file-system space. If this option is not specified, files to be printed are copied into the spooler directories. Be careful not to modify or remove the files submitted for printing until they have completed printing. -T title Specifies how the job is identified on the header portion of each page of the print job. This option requires the use of the -p option, which invokes pr; together these options operate like the -h option of the pr command. -w Specifies the page width in columns. This number is used by the pr command. To invoke pr, you must also supply the -p option. Together these options operate like the -w option of the pr command. DESCRIPTION lpr uses a spooling daemon to print the named files when facilities become available. If no files appear, the standard input is assumed. You can used the -P option to force output to a specific printer. Normally, the default printer is used (which is site dependent), or the value of the environment variable PRINTER is used. EXAMPLES To print three copies of the file foo.c, followed by three copies of the file bar.c, followed by three copies of more.c, enter lpr -#3 foo.c bar.c more.c To obtain three copies of the combined text of the same three files, enter cat foo.c bar.c more.c | lpr -#3 LIMITATIONS If you try to spool a file that is too large, it will be truncated. The lpr command can not be used to print files containing binary codes. STATUS MESSAGES AND VALUES Error messages will be produced if lpr finds binary files among the files to be printed. 2 January 1992
lpr(1) lpr(1)If a user other than root prints a file and spooling is disabled, lpr prints a message saying so and does not put jobs in the queue. If a connection to lpd on the local computer cannot be made, lpr prints a message saying that the daemon cannot be started. Diagnostics may be printed in the daemon's log file, regarding missing spool files by lpd. FILES /etc/passwd Personal identification file /etc/printcap Printer-capabilities database file /usr/lib/lpd* Files containing line printer daemons /usr/spool/* Directories used for spooling /usr/spool/*/cf* Daemon control files /usr/spool/*/df* Data files specified in cf* files /usr/spool/*/tf* Temporary copies of cf* files SEE ALSO lpq(1), lprm(1), pr(1) lpc(1M), lpd(1M) in A/UX System Administrator's Reference symlink(2), printcap(4) in A/UX Programmer's Reference January 1992 3