lp(1) CLIX lp(1)
NAME
lp, cancel - Sends/cancels requests to an LP line printer
SYNOPSIS
lp [-c] [-ddest] [-m] [-nnumber] [-ooption] [-s] [-ttitle] [-w] file
cancel [ids] [printers]
FLAGS
-c Make copies of the files to be printed immediately when lp is
invoked. Normally, files will not be copied, but will be
linked whenever possible. If the -c flag is not given, then
the user should be careful not to remove any of the files
before the request has been printed in its entirety. It should
also be noted that in the absence of the -c flag, any changes
made to the named files after the request is made but before it
is printed will be reflected in the printed output.
-ddest Choose dest as the printer or class of printers that is to do
the printing. If dest is a printer, then the request will be
printed only on that specific printer. If dest is a class of
printers, then the request will be printed on the first
available printer that is a member of the class. Under certain
conditions (printer unavailability, file space limitation, and
so on), requests for specific destinations may not be accepted
(see accept and lpstat). By default, dest is taken from the
environment variable $LPDEST (if it is set). Otherwise, a
default destination (if one exists) for the computer system is
used. Destination names vary between systems (see lpstat).
-m Send mail (see mail) after the files have been printed. By
default, no mail is sent upon normal completion of the print
request.
-nnumber Print number copies (default of 1) of the output.
-ooption Specify printer-dependent or class-dependent options. Several
such options may be collected by specifying the -o flag more
than once. For more information about what is valid for
options, see Models in lpadmin.
-s Suppress messages from lp such as request id is ....
-ttitle Print title on the banner page of the output.
-w Write a message on the user's terminal after the files have
been printed. If the user is not logged in, then mail will be
sent instead.
2/94 - Intergraph Corporation 1
lp(1) CLIX lp(1)
DESCRIPTION
The lp command arranges for the named files and associated information
(collectively called a request) to be printed by a line printer. If no
filenames are mentioned, stdin is assumed. The filename - stands for
stdin and may be supplied on the command line in conjunction with named
files. The order in which files appear is the same order in which they
will be printed.
The lp command associates a unique id with each request and prints it on
stdout. This id can be used later to cancel (see cancel) or find the
status (see lpstat) of the request.
The cancel command cancels line printer requests that were made by the lp
command. The command line arguments may be either request ids (as
returned by lp) or printer names (for a complete list, use lpstat).
Specifying a request id cancels the associated request even if it is
currently printing. Specifying a printerr cancels the request which is
currently printing on that printer. In either case, the cancellation of a
request that is currently printing frees the printer to print its next
available request.
EXAMPLES
1. To print three copies of the file foo on the printer laser with the
title job 1:
lp -dlaser -n3 -t"job 1" -w foo
A message is printed on the terminal when the job is finished.
2. To print the file foo.c, sending mail when the job is completed:
lp -m -c foo.c
The -c flag specifies the file is to be copied instead of linked.
This is useful when editing will occurs while the file is being
printed.
3. To cancel print request number 13:
cancel 13
4. To cancel the job currently printing on the printer laser:
cancel laser
FILES
2 Intergraph Corporation - 2/94
lp(1) CLIX lp(1)
/usr/spool/lp/*
DIAGNOSTICS
p: can't accept requests for destination name
The printer specified is not able to accept print requests: it does
not exist or is shutdown.
lp: no system default destination
No specific destination was given, and there is no default printer
defined. Use the -d flag.
lp: can't access file name
A file to be printed could not be linked or copied. Either the
permissions are wrong or the file does not exist.
cancel: name is not a request id or a printer
The argument given to cancel is not a know request ID or printer.
EXIT VALUES
The lp command returns a value of 0 if successful. If unsuccessful, lp
returns a value of 1.
RELATED INFORMATION
Commands: enable(1), lpstat(1), mail(1) accept(8), lpadmin(8), lpsched(8)
2/94 - Intergraph Corporation 3