Printing Services


Commands to print files from UNIX

  • qpr & kpr - Sending files to be printed.
  • enscript - Converting text files to PostScript.
  • qstat - Looking at files in printing queues.
  • qdev - Viewing printer status.

Printing format types

Output can be printed out in various different formats. The following table shows the format option and the command used to print. "filename" is the name of the file to be printed.

Option Print Command
drilled paper qpr -q smips -f drilled filename
undrilled qpr -q smips filename
landscape enscript -r -p - filename | qpr -q smips
duplex qpr -q smips filename
simplex qpr -q smips -S filename
two up enscript -2r -p - filename| qpr -q smips

Note: enscript works only on text files.

Printing queue names, device types and names, and their locations

Location Device Name Queue Name
006 Smith Hall HP9050 & HP8150 smips
220 Townsend Hall HP 5si tnsps



Laser (PostScript)

To print ASCII text or PostScript files on a laser printer, use the qpr command with the -q option to specify a laser printing queue followed by the filename:

qpr -q queuename filename

For example, to print a copy of a file "program.p" on a Smith Hall laser printer, you would type:

qpr -q smips program.p

HP DesignJet large format color printer

See DesignJet

Printing Commands


The enscript command reads in plain text files, converts them to PostScript language, and can output put them to a printer or file. You may specify fonts, headings, limited formatting options, and spooling options.

Command usage:

enscript [options] filename

where "filename" is the name of the file to be converted.

Useful options:

Option Result
 -#<number> Causes number of copies to be printed.
 -2 Sets output in 2 columns.
 -1 Sets output in 1 column (the default).
 -2 Sets output in 2 columns.
 -B Omits page headings.
 -c Cuts lines longer than the page width (normally, lines are wrapped).
 -f <font>Sets the font type to be used. Courier10 is the default Courier7 is used if in two columns or rotated.
 -F <font>Sets the font to be used in page headings.
 -G Prints page headings, dates & page number to be printed.
 -L <number>Sets the maximum number of lines per page.
 -m Causes the printer daemon to send mail upon job completion.
 -n <number>Causes "number" of copies of the output to be printed.
 -p <name>Saves converted file to a file named "name".
 -P Sends the formatted file to the specified queuename. For example: -Psmips or -Pwhlps
 -r Rotates the output 90 degrees (landscape).
 -R Doesn't rotate (portrait), the default.
 -S <feature>Specifies a printer feature such as manual feed or duplex. For example: -Sduplex or -Smanualfeed.
 -t Sets the job title for use on the burst page.
 -v<n> Output is set in "n" number of columns.

For example, the command:

enscript -Br -n4 -fPalatino-Roman10 -Ssimplex -Psmips data.txt

formats a file "data.txt" without special headings, rotates it 90 degrees to print in landscape format, prints 4 copies, changes the font type to Palatino-Roman10, prints the file in simplex (one-sided) format, sends the formatted file to be printed at the Smith Hall laser printers, and saves the converted file to a file named "" .


Use the qdev command to display the status of printer devices. You must execute the command from strauss to view the status.

Command usage:


An example of results produced by typing "qdev":

  smips6        white    Q16249.1927     29916 ("" 43% of 73k)
  smips7        drilled  (Idle)
  smips3        white    Q02948.113      28906 (accounting)
  smips4        white    Disabled (Idle)

qpr & kpr

Use the following commands to send files to printers on the central UNIX systems.


The qpr command is the main print command for the UNIX systems and the most versatile. Command usage:

qpr [options] filename

Useful Options:

 -c<number> Specifies "number" of copies to be printed.
 -f<formtype> Prints the file as a specified "formtype."
The default formtype is "white," which prints files on undrilled laser paper. Other useful formtypes are "drilled" and "trans" (for transparency).
 -m Causes a mail message to be sent to your account when your file has printed.
 -q<queuename> Allows a specific queue to be specified. The queuename for the Smith Hall PostScript printers is "smips". (See Printing queue names, device types and names, and their locations for more information.

For Example, the command:

qpr -q smips -c7 -m -f drilled

sends the file named "" to a Smith Hall laser printer with drilled paper (3-hole punched), prints 7 copies, and notifes the sender with an email message that the print job has finished. For more information on qpr, consult the manual pages on any UNIX system. You can view the manual pages on specific topics by typing the following command:

man topic

To view the man pages on qpr, type:

man qpr

kpr: Printing UNIX files on your PC's printer

The UNIX kpr command allows you to print a file from your UNIX account to a printer attached to your PC. Client Support & Services staff have tried the kpr command successfully with SSH Secure Shell, which can be downloaded from the University's software distribution page.

 The syntax for the command is :


You can use this command to print from a UNIX account, logged in through SSH, to an attached Windows networked printer.

Command usage:

kpr my_unix_filename

where "my_unix_filename" is the name of a TEXT file accessible from your UNIX account. Files that contain more than just text might also work, but could cause your computer to hang.


The kpr command is not officially supported by Information Technologies ("use at your own risk"), but offered for those who want to try it. There is some chance that using it could lock up your PC, requiring you to reboot the system.

If the UNIX system does not seem to recognize the kpr command, contact IT Support Center at 831-6000.


Use the qstat command to display printing queue information. This includes the queues to which files have been sent and the files that are currently printing on specific printers. You can only execute the qstat command from strauss to see the printing queue status.

The qstat -l command will show the printer queuename, request id userid, filename, priority number, file size, and time submitted.

 Command usage:

qstat -l 

Search IT Help

My UD Search for forms & applications.