Printing from UNIX
The BSD system is used to support the departments heterogeneous
computer
network.
UNIX printing commands
The following commands are used by the BSD printing system.
Where queue is the queue name for the
printer. See the list of printers page for the
printer name and location.
To print a file
lpr -Pqueue file_name
e.g. lpr -Plj-b57 paper.ps
- This will print the postscript file paper.ps on the
basement laser printer
in room B094.
To show the printer queue
lpq -Pqueue
e.g. lpq -Plj-b57
to cancel a print request
lprm -Pqueue job_number
- Job_number is the print request job number
obtained from the lpq command
Note.
- For more information on these commands use the UNIX man
command.
- Some computer vendors have added extensions to there print
commands to support
- select different fonts
- orientation
- paper tray etc
- Don' try and use these extensions as they will not work in
our heterogeneous
computer network.
- You may need to cancel a print job from the same system as
the print command
was issued.
Example
This example
- submits a file netscape.ps to the printer queue lj-b57
- examines the print queue using the lpq command.
Note.
The print request for the file netscape.ps
- is 2nd in the queue after the current active print
request
- has a job number of 81
- and cancels the print request for the file netscape.ps.
The output from lpq shows the netscape.ps print request to have job
number
81
User input is shown in bold text
orsay:~-108> lpr -Plj-b57 netscape.ps
orsay:~-109> lpq -Plj-b57
lj4_116 is ready and printing
Rank Owner Job Files Total Size
active ubcg19a 262 ... 668640 bytes
1st ubcg19a 263 ... 97009 bytes
2nd richards 81 netscape.ps 6749 bytes
orsay:~-110> lprm -Plj-b57 81
sun2.cryst.bbk.ac.uk: dfA081orsay.cryst.bbk.ac.uk dequeued
sun2.cryst.bbk.ac.uk: cfA081orsay.cryst.bbk.ac.uk dequeued
orsay:~-111> lpq -Plj-b57
lj4_116 is ready and printing
Rank Owner Job Files Total Size
active ubcg19a 262 ... 668640 bytes
1st ubcg19a 263 ... 97009 bytes
$Revision: 1.4 $ $Date: 2000/09/29 18:33:47 $
|