[Next] [Previous] [Up] [Top] [Contents]

4.2 Print Commands

4.2.1 lp/lpr - submit a print job

lp and lpr submit the specified file, or standard input, to the printer daemon to be printed. Each job is given a unique request-id that can be used to follow or cancel the job while it's in the queue.


lp [options] filename

lpr [options] filename

Common Options

lp lpr function

-n number -#number number of copies

-t title -Ttitle title for job

-d destination -Pprinter printer name

-c (default) copy file to queue before printing

(default) -s don't copy file to queue before printing

-o option additional options, e.g. nobanner

Files beginning with the string "%!" are assumed to contain PostScript commands.


To print the file ssh.ps:

% lp ssh.ps

request id is lp-153 (1 file(s))

This submits the job to the queue for the default printer, lp, with the request-id lp-153.

Introduction to Unix - 14 AUG 1996
[Next] [Previous] [Up] [Top] [Contents]