lpr |
Prints a file to a TCP/IP print server running LPD.
lpr -S servername -P printername [-C classname] [-J jobname] [-o option] [-x] [- d] filename
-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 is used). This appears on the banner page (if enabled on the print server).
-J jobname
Specifies the name of your job (otherwise, the name of the file you are printing is 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.
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 whether the job is pending.
lpq,
Printing