Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ lp(1) — CX/UX 6.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

enable(1)

lpstat(1)

mail(1)

accept(1M)

lpadmin(1M)

lpsched(1M)

lp(1)

NAME

lp, cancel − send/cancel requests to an LP line printer

SYNOPSIS

lp [−c] [−ddest] [−m] [−nnumber] [−ooption] [−s] [−ttitle] [−w] files
cancel [ids] [printers] [-Pprinter] [-uusername] [-all] [-REMOTE]

DESCRIPTION

lp arranges for the named files and associated information (collectively called a request) to be printed by a line printer. If no file names are mentioned, the standard input is assumed. The file name − stands for the standard input 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. 

lp associates a unique id with each request and prints it on the standard output.  This id can be used later to cancel (see cancel ) or find the status (see lpstat(1)) of the request. 

The following options to lp may appear in any order and may be intermixed with file names:

−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 option 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 option, 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, etc.), requests for specific destinations may not be accepted (see accept(1M) and lpstat(1)).  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(1)). 

−m Send mail (see mail(1)) 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 keyletter more than once.  The following options are available for most printers.  For more information about what is valid for options, see Models in lpadmin(1M). 

-o-sl On systems running CX/SX, override security labels on each page of output.  Use of this option is audited. 

-o-p Pass output through pr(1) prior to printing.  This option is implied on CX/SX systems. 

-o-P Do not pass output through pr(1) prior to printing.  This overrides the default for CX/SX systems. 

-o-Ttitle
The pr(1) filter will use title instead of the filename in the header. 

-o-wproption
Pass proption to the pr(1) filter. 

−s Suppress messages from lp(1) 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. 

Cancel cancels line printer requests that were made by the lp(1) command.  The command line arguments may be either request ids (as returned by lp(1)) or printer names (for a complete list, use lpstat(1)).  Specifying a request id cancels the associated request even if it is currently printing.  Specifying a printer 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. 

−uuser
Delete this user’s requests only.

−all Delete all of your or the user’s requests. 

−REMOTE
Flag used by lpd to set remote queue display option.

SECURITY FEATURES

The following security features are in effect on systems running CX/SX configured to B1 security. 

When issued by a user operating at a classified level N, the spool file created will likewise be labeled at level N. The interface script used to print the output on the designated printer can then be used to print the appropriate human readable security labels on the top and bottom of each page.

lp eases this task by guaranteeing that last "option" argument passed to the interface script is "class=<priv>" where <priv> is the real privilege name with which the user was operating when the command was executed.  This effectively provides the "human readable" security label for use by the interface script. 

To override the security labels on the top and bottom of every page, the -o-sl option may be used.  This is audited.  The security label will always be printed on the header and trailer pages. 

lp will verify that the user’s operating security level is within the range of security levels for which the specified printer is cleared. 

Because the top and bottom markings replace the corresponding lines in the spool file, the -o-p option is implied whenever these security labels are printed.  This will assure that the corresponding lines do not contain any pertinent data, by passing the file through pr(1) prior to printing.  The -o-P option will override this default.  The -c option to lp is also implied on systems running CX/SX, this cannot be overridden. 

Users may only cancel their own printer requests on systems running CX/SX.  The super-user may cancel any request. 

SECURITY EXAMPLES

lp -dlaser1 concept.spec

This example prints the file concept.spec on printer laser1.  The file is passed through pr(1) prior to adding security labels, thus assuring that the labels do not replace text in the file. 

lp -o-sl -m outfile

This example prints the file outfile on the default printer, and sends mail when printing is complete.  Security labels will not be printed on the top and bottom of every page.  The fact that security labelling was overridden will be audited.  Because security labels are not printed, the file is not run through pr(1). 

lp -dprinter1 -o-P specialfile

This example prints the file specialfile on printer1, and prints security labels on the top and bottom of every page.  The file is not run through pr(1) prior to printing, so the user should have ensured that the file was already formatted so as to avoid losing data when the security labels are added. 

FILES

/usr/spool/lp/∗

SEE ALSO

enable(1), lpstat(1), mail(1), accept(1M), lpadmin(1M), lpsched(1M)

BUGS

If the “file” specified in the argument list falls under a multi-level secured directory (e.g. in /dev, /tmp, or /usr/tmp, or in /usr/mail if multi-level mail is enabled), the lp(1) command will fail to find the file.  Use standard input to avoid the problem.  E.g. instead of lp /tmp/x use lp < /tmp/x. 

CX/UX User’s Reference Manual

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