lpr Command Purpose Enqueues print jobs. Syntax lpr [ -# Number ] [ -C Class ] [ -h ] [ -i [ Number ] ] [ -J Job ] [ -m ] [ -P Printer ] [ -r ] [ -s ] [ -T Title ] [ -w Number ] [ -FilterOption ] [ File ... ] Description The lpr command uses a spooling daemon to print the named File when facilities become available. If no files are specified, the lpr command reads from standard input. Flags -# Number Produces multiple copies of output, using Number as the number of copies for each file named. -C Class Specifies the print Class as the job classification on the burst page. -h Suppresses printing of the burst page. Note: The default is to print a header page and not a trailer page. -i [Number] Indents output Number spaces. If Number is not given, eight spaces are used as the default. -J Job Prints Job as the job name on the burst page. Normally, the lpr command uses the name of the first file. -m Sends mail upon completion of spooling. -P Printer Forces output to Printer. If this flag is not speci- fied, the following conditions occur: * If a default exists, the lpr command uses the default printer. * If the LPDEST environment variable is set, then lpr uses the value specified by the LPDEST variable. If set, this value is always used, even if the PRINTER variable is also set. * If the PRINTER variable is set and no LPDEST variable is set, then lpr uses the value specified by the PRINTER environment var- iable. Note: Any destination command line options override both the LPDEST and the PRINTER environment variables. -r Removes the file upon completion of spooling. -s Prints from the files specified on the command line rather than trying to copy them (so large files can be printed). This means the data files should not be modified or removed until they have been printed. Note that this flag only works on the local host (files sent to remote printer hosts are copied anyway), and only with named data files. It does not work if the lpr command is at the end of a pipeline. -T Title Uses Title instead of the file name for the title used by the pr command. -w Number Uses Number as the page width for the pr command. -FilterOption The following options notifiy the line printer spooler that the files are not standard text files. The spooling daemon will use the appropriate filter to print the data. p Uses the pr command to format the file (lpr -p is very much like pr | lpr). n Uses a filter which formats files containing ditroff (device- independent troff) data. Examples 1. To print three copies of the files new.index.c, print.index.c, and more.c, enter: lpr -#3 new.index.c print.index.c more.c Prints three copies of the new.index.c file, three copies of the print.index.c file, and three copies of the more.c file. 2. To print three copies of the concatenation of three files new.index.c, print.index.c, and more.c, enter: cat new.index.c print.index.c more.c | lpr -#3 3. To print Operations on the burst page, followed by file new.index.c, enter: lpr -C Operations new.index.c This replaces the system name (the name returned by host name) with Operations on the burst page. Implementation Specifics This command is part of Base Operating System (BOS) Runtime. Files /usr/sbin/ qdaemon Queuing daemon. /etc/qconfig Queue configuration file. /etc/qconfig.bin Digested, binary version of the /etc/qconfig file. /var/spool/lpd/qdir/* Queue requests. /var/spool/lpd/stat/* Information on the status of the queues. /var/spool/qdaemon Temporary copies of enqueued files. Related Information Printers, Print Jobs and Queues Overview for Users in AIX Ver- sion 3.2 System User's Guide: Base and Devices. Printer Overview for System Management in AIX Version 3.2 System Management Guide: Operating System and Devices. Queuing System Overview for System Management in AIX Version 3.2 System Management Guide: Operating System and Devices. The lpd command, lpq command, lprm command, pr command, qdaemon command. The qconfig file. How to Start a Print Job in AIX Version 3.2 System User's Guide: Base and Devices.