Name

lpr

Synopsis

Prints a file to a TCP/IP print server running the LPD daemon.

Syntax

lpr -S servername -P printername [-C classname] [-J jobname] [-o option] 
[-x] [-d] filename

Options

-S servername

Indicates the name or IP address of the LPD print server.

-P printername

Indicates the name of the print queue on the server.

-C classname

Specifies something to identify the output as your job (otherwise, the hostname of your computer will be used). This appears on the banner page (if enabled on the print server).

-J jobname

Specifies the name of your job (otherwise, the filename of the file you are printing will be used). This appears on the banner page (if enabled on the print server).

-o option

Specifies the type of file being printed (the default is ASCII text). For example, specify .PS as the option when printing PostScript files.

-x

Provides backward compatibility for printing to LPD servers running older versions of SunOS.

-d

Transfers the datafile before the control file, if needed by the LPD server.

filename

Indicates the file you are printing.

Examples

Send a job to queue HPLASERJ on LPD server 172.16.11.104:

                     lpr -S 172.16.11.104 -P hplaserj -C Mitchell -J 
                       Testing C:\hello.txt

Use lpq to check the queue to verify if the job is pending.

See Also

lpq

Get Windows 2000 Administration in a Nutshell now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.