lp Command Purpose Sends requests to a line printer. Syntax lp [ -c ] [ -dQueue ] [ -m ] [ -nNumber ] [ -oOption ] [ -tTitle ] [ -w ] [ Files ] Description The lp command arranges for the Files and associated information (called a request) to be printed by a line printer. If no Files are given, the standard input is assumed. The file name - (dash) stands for the standard input and can be supplied on the command line with the named Files. The files are printed in the order given with the lp command. Flags -c Copies the files to be printed immediately when the lp command is run. The lp command copies files only when requested. No links are created. If the -c flag is not used, be careful not to remove any of the files before they are printed. If the -c flag is not used, changes made to the files after the request is made appear in the printed output. -dQueue Specifies the print Queue to which a job is sent. -m Sends mail (see the mail command) after the files are print- ed. By default, no mail is sent upon normal completion of the print request. -nNumber Prints the Number of copies of printed output. The de- fault number of copies is 1. -oOption Specifies that flags specific to the backend be passed to the backend. Thus, for each queue, there are flags not described in this article that can be included with the lp com- mand. See the piobe command for a list of these flags. Speci- fying this flag is the same as specifying the -o flag for the qprt command. -tTitle Specifies printing the title of the file on the banner page of the output. -w Writes a message on the print requester's terminal after the files are printed. If the requestor is not logged in, the mail command sends the message. If the user is logged in on multiple windows or terminals, the message may not be sent to the HFT where the command was issued. The message is sent to the first terminal on which the writesrv daemon sees the user to be logged in. Exit Status This command returns the following exit values: 0 All input files processed successfully. >0 No output device available, or an error occurred. Examples 1. To print the /etc/motd file on printer lp0 attached to device dlp0, enter: lp /etc/motd 2. To print 30 copies of the /etc/motd file using a copy of the file, and to notify the user that the job is completed using mail, enter: lp -c -m -n30 -dlp0:lpd0 /etc/motd 3. To print the /etc/motd file using backend flags -f and -a, with a job title of blah, enter: lp -t"blah" -o -f -o -a /etc/motd Implementation Specifics This command is part of Base Operating System (BOS) Runtime. Files /usr/sbin/ qdaemon Contains the queuing daemon. /var/spool/lpd/qdir/* Contains the queue requests. /var/spool/lpd/stat/* Contains information on the status of the devices. /var/spool/qdaemon/* Contains temporary copies of enqueued files. /etc/qconfig Contains queue configuration file. /etc/qconfig.bin Contains digested, binary version of the /etc/qconfig file. Related Information The cancel command, enable command, lpr command, lpstat com- mand, mail command. The writesrv daemon. The /etc/qconfig file. How to Start a Print Job in AIX Version 3.2 System User's Guide: Base and Devices. Printers, Print Jobs, and Queues Overview for Users in AIX Ver- sion 3.2 System User's Guide: Base and Devices. The Printer Overview for System Management in AIX Version 3.2 System Management Guide: Operating System and Devices. The Queuing System Overview for System Management in AIX Version 3.2 System Management Guide: Operating System and Devices.