The lpr command

The lpr command



What does it do ?

It sends a print request to a printer. NOTE: In BR 165 and BR 161, the commands br165 filename and br161 filename, respectively, can be used to print files to the local laser printers.


How is it used ?

lpr filename


Examples and remarks

If you type in the command lpr assignment1.c, you will place a print request for assignment1.c on the default printer. The lp command works in the same manner as the lpr command. Once, the lp or lpr command is entered, the user will receive the filename, length of file, and request id on the screen. If you decide to cancel a print job, use the command cancel. The format is cancel request id, for example, cancel hp4simxbr202-894. The reasons for cancelling a request are many, which include, the printer breaking, suffering from a paper jam, or running out of paper. You may also decide not to print the document after all. To find out the status of a print job, type the command lpstat or lpq at the prompt. It will give you a list of print requests that are waiting to be printed. If there are no print requests in the list or none being printed, you will not get much of a response from these two commands.



next previous table of contents