next up previous contents
Next: On a PC Up: Printing Previous: Printing   Contents

On a UNIX server

The following commands work from our UNIX servers.

To print Plain Text files use print5 to print on the double sided laser printer PS4 outside room 664 e.g.:-

print5 myfile.dat
There are a number of variants of the print5 command, for example:-

print5L 		  Landscape.  Use if lines are longer than 80 chars.

print5_2up 2 pages of file on each sheet of paper.
print5L_2up Landscape, 2 pages per sheet.
Originally PS4 was on level 5, hence the 5 in the commands names.

Use the equivalent print6... command to print on the single sided laser printer PS1 outside room 615.

To print Postscript files use print5p or print6p.

A quick way to find out what other print commands are available is to start by typing:-

which print5
This command tells you which file will be executed when you type print5. The reply should be something like:-
/usr/local/bin/print5
so now you type:-
ls -l /usr/local/bin/print*
to see what other print commands there are. Alternatively check the web:-
http://www.physics.ox.ac.uk/computing/particle_physics/Unix/pp_unix_faq.html

On any UNIX system, the commands to send files to a print queue, check on its progress and remove it, all start lp (line printer).

To check on status of printer queues use the lpstat command. Typing:-

lpstat -a
will list all those queues that are currently active. The file:-
/etc/printcap
contains a complete list of printers specifying their queue characteristics. The first line of each entry gives a list of alternative names for a printer e.g. level5p and ps4p . By convention each entry is preceded by a description of the printer e.g.:-
# The main double sided postscript printer on level5
# use the print5 and print5p commands.
level5p|ps4p:

To print any type of file use the lpr command with the -P option designating the printer name e.g. to print myfile on printer xxx type:-

lpr -Pxxxx myfile
replacing xxxx by ps4p for Postscript to PS4.

To see what entries you currently have in the queue type:-

lpq -Pxxxx
and to remove an entry type:-
lprm -Pxxxx yyy
where yyy is the job number as given by the lpq command.


next up previous contents
Next: On a PC Up: Printing Previous: Printing   Contents
P.D. Gronbech (IT Staff) 2015-10-02