 |
Index for Section 1 |
|
 |
Alphabetical listing for L |
|
lp(1)
NAME
lp, cancel - Sends or cancels a printing request
SYNOPSIS
lp [-cmsw] [-A options] [-o option] [-d printer] [-n copies] [-t title]
[file...]
cancel [request_ID...] printer...
cancel request_ID... [printer...]
STANDARDS
Interfaces documented on this reference page conform to industry standards
as follows:
lp: XPG4, XPG4-UNIX
cancel: XPG4, XPG4-UNIX
Refer to the standards(5) reference page for more information about
industry standards and associated tags.
OPTIONS
[XPG4-UNIX] Options for the lp command can appear in any order and can be
mixed with filenames.
[XPG4-UNIX] The cancel command has no options.
-A options
[Compaq] Specifies one or more country-specific options. See lpr(1)
for details about these options.
-c [XPG4-UNIX] Makes copies of the files to be printed immediately when
lp is invoked. Normally, files are not copied, but are linked whenever
possible. If the -c option is not given, be careful not to remove any
of the files before the request is finished printing. Note also that
in the absence of the -c option any changes made to the named files
after the request is made, but before it is printed, are reflected in
the printed output.
-d printer
[XPG4-UNIX] Selects printer as the device to do the printing (also
known as the printing destination). Under certain conditions (printer
unavailability, file space limitations, and so on), requests for
specific destinations cannot be accepted. By default, printer is taken
from the LPDEST environment variable if it is set. Otherwise, the
PRINTER environment variable or a default destination, if one exists,
for the system is used. Destination names vary between systems. (See
the lpq(1) and lpstat(1) reference pages.)
-m [XPG4-UNIX] Sends mail (see the mailx(1) reference page) after the
files are printed. By default, no mail is sent upon normal completion
of the print request.
-n number
[XPG4-UNIX] Prints number copies (default of 1).
-o option
[XPG4-UNIX] This option is recognized as valid option by the command-
line parser, but is not supported on a Tru64 UNIX system. On other
systems, multiple -o options can be used to specify printer-dependent
or class-dependent options.
-s [XPG4-UNIX] Suppresses messages from lp, such as "request id is ...".
-t title
[XPG4-UNIX] Prints title on the banner page of the output.
-w [XPG4-UNIX] Functions like -m (for compatibility reasons).
OPERANDS
file...
[XPG4-UNIX] Specifies one or more files to be printed.
request_ID
[XPG4-UNIX] Cancel the request with the request ID.
printer
[XPG4-UNIX] Cancel all requests made by you with that printer as the
destination.
DESCRIPTION
[XPG4-UNIX] The lp command sends the specified files and associated
information (collectively called a request) to a line printer for printing.
The cancel command cancels printing requests.
[XPG4-UNIX] The lp command associates a unique ID with each request and
prints it on the standard output. If you do not specify a file, or specify
a - (dash) in place of a file, lp accepts standard input at this point in
the list of files.
[XPG4-UNIX] The cancel command cancels printer requests made by the lp or
lpr command (see lpr(1)). You can specify either request_ID, to cancel the
request with that request ID, or printer, to cancel all requests made by
you with that printer as the destination. (If you are operating with
superuser authority, all requests to that printer are canceled, including
those of other users.) A specified request is canceled even if it is
currently printing, and the printer is freed to print the next available
request.
[XPG4-UNIX] You can also use the request ID to find the status of the
request. (See the lpq(1) and lpstat(1) reference pages.)
EXIT STATUS
[XPG4-UNIX] The following exit values are returned by both the cancel and
lp commands:
0 [XPG4-UNIX] Successful completion.
>0 [XPG4-UNIX] An error occurred.
ENVIRONMENT VARIABLES
The following environment variables affect the execution of lp and cancel:
LANG
[XPG4-UNIX] Provides a default value for the internationalization
variables that are unset or null. If LANG is unset or null, the
corresponding value from the default locale is used. If any of the
internationalization variables contain an invalid setting, the utility
behaves as if none of the variables had been defined.
LC_ALL
[XPG4-UNIX] If set to a non-empty string value, overrides the values
of all the other internationalization variables.
LC_CTYPE
[XPG4-UNIX] Determines the locale for the interpretation of sequences
of bytes of text data as characters (for example, single-byte as
opposed to multi-byte characters in arguments).
LC_MESSAGES
[XPG4-UNIX] Determines the locale for the format and contents of
diagnostic messages written to standard error.
LC_TIME
[XPG4-UNIX] Determines the format of date and time strings displayed
in the banner.
LPDEST
[XPG4-UNIX] Determines the output device destination if the -d option
is not used with the lp command.
NLSPATH
[XPG4-UNIX] Determines the location of message catalogues for the
processing of LC_MESSAGES.
PRINTER
Determines the output device destination if the -d option is not used
with lp command and the LPDEST environment variable is not set.
FILES
/etc/printcap
Printer description file
/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
/var/spool/*/minfree
Minimum free space to leave
/dev/lp*
Line printer devices
/dev/printer
Socket for local requests
SEE ALSO
Commands: lpc(8), lpd(8), lpq(1), lpr(1), lprm(1), lpstat(1), mailx(1)
Others: i18n_printing(5)
Standards: standards(5)