next up previous contents
Next: The UNIX C Shell Up: Introduction to UNIX on Previous: Checking Your Spelling

How to Print a file

To print a document, use the lpr (for 'lineprinter') command. A specific printer is selected with the -P<printername> argument as follows:

lpr -Prayvaughn <documentname>

We currently have 4 general access print queues. None of these is a postscript printer, so don't send them postscript files:

rayvaughn    Printronix dot matrix              Room 119
room119      2 Epson FX1170 dot matrix          Room 119
room106	     2 Panasonic KXP1124i dot matrix    Room 106

To see a status report of any printer available on the system use the lpq command. If a printer is not specified using the -P option then lpq displays printer queue information for the default printer, the one specified by the PRINTER environment variable. To see what is in the queue of a specific printer use the -P option with a printer name, in this case the printer is rayvaughn:

lpq -Prayvaughn

Here is what you might see as the result of an lpq command:

rayvaughn is ready and printing
Rank   Owner      Job  Files                                 Total Size
active ARSENA42   256  DEPREERR.CPP                          60 bytes
1st    ajalbert   25   ftp.note                              607 bytes

To delete a print job, you type:

lprm -P{printer} {job number}

So typing lprm -Prayvaughn 25 will remove the file ftp.note from the queue.

To remove all of the print jobs that you own type:

lprm -P{printer} -

Make sure you attempt the lprm from the same machine from which you submitted the job. You will get a permission denied error message if you attempt it from another machine.

An alternative to printing locally is to download files to a floppy and print the files elsewhere.

One way to do this is to use any PCgif on campus and FTP to gandalf.umcs.maine.edu. You can then log into your account and transfer the files you want to floppy disk. FTPing is further detailed in a separate chapter.

Please try to only print things that you absolutely need printed. Careless printing is a terrible waste of the earth's resources. If you cannot find your file on the printer after you print it, please try and find out why before you print another copy. If the printer was offline, and then comes online at a later point, your multiple copies will be printed, and wasted.


next up previous contents
Next: The UNIX C Shell Up: Introduction to UNIX on Previous: Checking Your Spelling

Larry Latour
Fri Sep 12 08:12:59 EDT 1997