LPR(1B) BSD Compatibility Package Commands LPR(1B)

lpr - submit print requests

/usr/ucb/lpr [-P destination] [-# number] [-C class]
     [-J job] [-T title] [-i [indent]]
     [-1 | -2 | -3 | -4 font] [-w cols] [-m] [-h] [-s]
     [-filter_option] [file]...

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.

The print client commands locate destination information using the "printers" database in the name service switch. See nsswitch.conf(5), printers(5), and printers.conf(5) for details.

Print requests with more than 52 files specified is truncated to 52 files when the BSD print protocol is used for job submission.

The following options are supported:

-C class

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).


Suppresses printing of the banner page of the output.

-i indent

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. If the optional argument to indent is not specified, then eight SPACE characters is the default. The -i option is ignored unless it is specified with the -p filter option.

-J job

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.


Sends mail after file has printed. See mail(1). By default, no mail is sent upon normal completion of a print request.

-P destination

Prints file on a specific printer or class of printers (see lpadmin(8)). Specify destination using atomic, URI-style (scheme://endpoint), or POSIX-style (server:destination) names. See printers.conf(5) for information regarding destination names.


Prints files by reference rather than copying them. This means that files should not be modified or removed until they have completed printing. This option only prevents copying of files when the print queue is on the local machine and the files are specified on the command line.

-T title

Prints a title on the page header of the output. Enclose title in double quotes if it contains blanks. The -T option is ignored unless it is specified with the -p filter option.

-w cols

Prints file with pages of a specific width. cols indicates the number of columns wide. The -w option is ignored unless it is specified with the -p filter option.

1|−2|−3|−4 font

Mounts the specified font in the font position 1, 2, 3, or 4. Specify font as a valid font name.


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 filter options might 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.

The following filter options are supported:


file contains data produced by cifplot.


file contains tex data in DVI format from Stanford.


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


file contains standard plot data produced by plot(1B) routines.


Print control characters and suppress page breaks.


file contains ditroff data from device independent troff.


Use pr to format the files. See pr(1).


file contains troff (cat phototypesetter) binary data.


file contains a raster image. printer must support an appropriate imaging model such as PostScript in order to print the image.

-# number

Prints a specific number of copies. Specify number as a positive integer. The default for number is 1.

The following operand is 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(7) for the description of the behavior of lpr when encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).

The following exit values are returned:


Successful completion.


An error occurred.

System printer configuration database


User-configurable printer database


LDAP version of /etc/printers.conf


NIS version of /etc/printers.conf

See attributes(7) for descriptions of the following attributes:

Interface Stability Standard
CSI Enabled. See NOTES

hostname(1), lp(1), lpstat(1), mail(1), pr(1), troff(1), lpc(1B), lpq(1B), lprm(1B), plot(1B), nsswitch.conf(5), printers(5), printers.conf(5), attributes(7), largefile(7), standards(7), lpadmin(8)

lpr: destination |: unknown destination

destination was not found in the LP configuration database. Usually this is a typing mistake; however, it can indicate that the destination does not exist on the system. Use lpstat -p to display information about the status of the print service.

lpr is CSI-enabled except for the printer name.

Print jobs are assumed to contain one type of data. That type of data is either specified on the command line or autodetected (simple, PostScript) based on the contents of the first file in the job.

When IPP is in use, the user is prompted for a passphrase if the remote print service is configured to require authentication.

February 25, 2017 OmniOS