Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

lp(1)

/cancel(1)

lpc(8)

lpd(8)

lpq(1)

lprm(1)

lpstat(1)

mailx(1)

/Mail(1)

pr(1)

symlink(2)

lpr(1)  —  Commands

OSF

NAME

lpr − Sends files to spooling daemon for printing

SYNOPSIS

lpr [−hjmrs] [filetype_flag] [−C class] [−i] [number] [−J name] [−Pprinter]
[−T title] [−#number] [−1 font, −2 font, −3 font, −4 font] [−wnumber] file ...  | −

The lpr command uses a spooling daemon to print the named files when facilities become available. 

DESCRIPTION

The filename − (dash) stands for standard input and can be used in conjunction with the named files.  If no files are specified, lpr reads from standard input. 

The −P flag selects the specified printer as the output device.  Normally, the default printer or the value of the PRINTER environment variable is used. 

To check the status of printer requests made with the lpr or lp commands (see lp), use the lpq or lpstat commands. To cancel printer requests, use the lprm or cancel commands. 

Note that DEC OSF/1 does not include ditroff or troff. 

FLAGS

Several of the following flags, indicated by filetype_flag in SYNOPSIS, are used to notify the line printer spooler that the files are not standard text files (−c, −d, −f, −g, −l, −n, −p, −t, −v). These flags, therefore, are mutually exclusive. The spooling daemon uses the appropriate filters to print the data when you specify one of these flags. 

−cAssumes that the files contain data produced by the cifplot filter. 

−C class
Specifies a print class as the request classification on the burst page.

−dAssumes that files contain data from tex (DVI format from Stanford University). 

−fInterprets the first character of each line as a standard FORTRAN carriage control character. 

−gAssumes that files contain standard plot data as produced by plot routines. 

−hSuppresses the printing of the burst page. 

−i [number]
Indents the output number spaces.  If number is not given, prints 8 spaces. 

−jCauses the request ID of the printer request to be displayed on standard output after it is entered in the queue. 

−J name
Specifies the request name to appear on the burst page. Normally, the lpr command uses the name of the first file. 

−lPrints control characters and suppresses page breaks. 

−mSends mail (see the mailx command) upon completion of spooling. 

−nAssumes that files contain data from ditroff (device independent troff). 

−pFormats the files using pr as a filter. 

−Pprinter
Specifies printer as the output device (also known as the destination). Without it, the default printer or the value of the PRINTER environment variable is used. 

−rRemoves the file on completion of spooling or on completion of printing (with −s). 

−sUses symbolic links. Usually files are copied to the spool directory.  The −s flag uses symlink() to link data files, rather than trying to copy them, so large files can be printed. This means the files should not be modified or removed until they are printed. 

−tAssumes that files contain data from troff (cat phototypesetter commands) binary data. 

−T titleSpecifies the title to be used by the pr command in place of the filename. Use with the −p flag. 

−vAssumes that the files contain a raster image for devices like the Benson Varian. 

−wnumber
Defines the page width for pr. 

−#number
Produces number copies of the output. 

−1 font, −2 font, −3 font, −4 font
Mounts the specified font on font position 1, 2, 3, or 4.

EXAMPLES

     1.To print three copies of the files new.index.c, print.index.c, and more.c, enter:

lpr −#3 new.index.c print.index.c more.c

     2.To print three copies of the concatenation of the three files new.index.c, print.index.c, and more.c, enter:

cat new.index.c print.index.c more.c |lpr −#3

     3.To print Operations on the burst page before the file new.index.c, enter:

lpr −C Operations new.index.c

This causes the system name (the name returned by hostname) to be replaced on the burst page by Operations, and the file new.index.c to be printed. 

NOTES

     1.If you try to spool too large a file, the file is truncated.  lpr will object to printing binary files. If a user other than the root user prints a file and spooling is disabled, lpr will print a message saying so and will not put requests in the queue.  If a connection to lpd on the local machine cannot be made, lpr will say that the daemon cannot be started. 

     2.Fonts for troff and text reside on the host with the printer. It is not currently possible to use local font libraries. 

FILES

/etc/passwdContains user information. 

/etc/printcapPrinter description file. 

/usr/sbin/lpdLine printer daemon. 

/var/spool/∗Spool directories. 

/var/spool/∗/cf∗Daemon control files. 

/var/spool/∗/df∗Data files specified in cf files. 

/var/spool/∗/tf∗Temporary copies of cf files. 

RELATED INFORMATION

Commands: lp(1)/cancel(1), lpc(8), lpd(8), lpq(1), lprm(1), lpstat(1), mailx(1)/Mail(1), pr(1). 

Functions: symlink(2). 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026