The LPR Print Command
To print, use the lpr command followed by the name of the text or postscript file that you want to print.
For example, to print the myjob.ps postscript file to your default printer type,
% lpr myjob.ps
Like most unix applications, lpr can accept files from pipes and redirects. The following commands will also work:
% lpr < myjob.ps
% echo myjob.ps | lpr
Printing to a printer other than the default
Andrew Printers
To print to a printer other than your default printer, you can add the -Pprintername command to the lpr command.
For example, to print the myjob.ps postscript file to the printer Baker cluster printer, you would type:
% lpr -Pcl-baker@printing.andrew.cmu.edu myjob.ps
Stand alone printers
If you'd like to print to a stand alone printer (perhaps in a department), you can specify the hostname of the printer by using lpq -P@hostname.
For example, to print the myjob.ps postscript file to thehostname printer, you would type:
% lpr -P@hostname.andrew.cmu.edu myjob.ps
Last Updated: 06/02/06