The lpr utility submits print requests to a destination. lpr prints files (file) and associated information, collectively called a print request. If file is not specified, lpr assumes the standard input.
Print requests with more than 52 files specified will be truncated to 52 files. lpr displays a warning message.
The following options are supported:
Prints file on a specific printer or class of printers (see lpadmin(1M)). Specify destination using atomic, POSIX-style (server:destination), or Federated Naming Service (FNS) (…/service/printer/…) names. See printers.conf(4) for information regarding the naming conventions for atomic and FNS names, and standards(5) for information regarding POSIX.
Prints a specific number of copies. Specify number as a positive integer. The default for number is 1.
Prints class as the job classification on the banner page of the output. Enclose class in double quotes if it contains blanks. If class is not specified, the name of the system (as returned by hostname) is printed as the job classification. See hostname(1).
Prints job as the job name on the banner page of the output. Enclose job in double quotes if it contains blanks. If job is not specified, file (or in the case of multiple files, the first file specified on the command line) is printed as the job name on the banner page of the output.
Prints a title on the banner page of the output. Enclose title in double quotes if it contains blanks. If title is not specified, file is printed on the banner page.
Indents the output a specific number of SPACE characters. Use indent to indicate the number of SPACE characters to be indented. Specify indent as a positive integer. Eight SPACE characters is the default.
Mounts the specified font in the font position 1, 2, 3, or 4. Specify font as a valid font name.
Prints file with pages of a specific width. cols indicates the number of columns wide.
Sends mail after file has printed. See mail(1). By default, no mail is sent upon normal completion of a print request.
Suppresses printing of the banner page of the output. Use of this option requires the print without banners authorization.
Uses full pathnames (as opposed to symbolic links) to file rather than trying to copy them. This means file should not be modified or removed until it has completed printing. Option -s only prevents copies of local files from being made on the local machine. Option -s only works with specified files. If the lpr command is at the end of a pipeline, file is copied to the spool. This option is not supported in the Trusted Solaris environment.
Notifies the print spooler that file is not a standard text file. Enables the spooling daemon to use the appropriate filters to print file.
filter_options offer a standard user interface. All options may not be available for, or applicable to, all printers.
Specify filter_option as a single character.
If filter_option is not specified and the printer can interpret PostScript®, inserting `%!' as the first two characters of file causes file to be interpreted as PostScript. In the Trusted Solaris environment, printing a file containing PostScript commands requires the print a PostScript file authorization.
Use pr to format the files. See pr(1).
Print control characters and suppress page breaks.
file contains troff (cat phototypesetter) binary data.
file contains ditroff data from device independent troff.
file contains TEX® data in DVI format from Stanford.
file contains standard plot data produced by plot(1B) routines.
file contains a raster image. printer must support an appropriate imaging model such as PostScript in order to print the image.
file contains data produced by cifplot.
Interprets the first character of each line as a standard FORTRAN carriage control character.
The following operands are supported:
The name of the file to be printed. Specify file as a pathname. If file is not specified, lpr uses the standard input.
See largefile(5) for the description of the behavior of lpr when encountering files greater than or equal to 2 Gbyte ( 231 bytes).
File containing the sequence numbers for job ID assignment.
Spooling directories and files.
See attributes(5) for descriptions of the following attributes:
|ATTRIBUTE TYPE||ATTRIBUTE VALUE|
|CSI||Enabled (see NOTES)|
Use of the -h option requires the print without banners authorization. Printing a file that contains PostScript commands requires the print a PostScript file authorization, unless the PRINT_POSTSCRIPT option is set in /etc/default/print. The -s option is accepted but ignored; a copy of the file is always made before printing.
destination was not found in the LP configuration database. Usually this is a typing mistake; however, it may indicate that the destination does not exist on the system. Use lpstat -p to display information about the status of the print service.
The printer was not found in the LP database. Usually this is a typing mistake; however, it may indicate that the printer does not exist on the system. Use lpstat -p (see lpstat(1)) or lpc status (see lpc(1B)) to discover the reason.
The connection to lpsched on the local machine failed. This usually means the printer server started at boot time has died or is hung. Check to see whether the printer spooler daemon /usr/lib/lpsched is running.
This means the queue was turned off with /usr/etc/lpc disable printer to prevent lpr from putting files in the queue. This is normally done by the system manager when a printer is going to be down for a long time. The printer can be turned back on by an administrator with lpc.
These indicate that the LP print service has been stopped. Get help from the system administrator.
It is likely there is an error in this software. Get help from system administrator.
Use the `lpstat -p -l' command to find a printer that can handle the file type directly, or consult with your system administrator.
Make sure file names are valid.
lpr is CSI-enabled except for the printer name.
lp is the preferred interface.
Command-line options cannot be combined into a single argument as with some other commands. The command: lpr -p
is not equivalent to pr | lpr.
lpr -p puts the current date at the top of each page, rather than the date last modified.
Fonts for troff(1) and TEX® reside on the printer host. It is currently not possible to use local font libraries.
lpr objects to printing binary files.