COHERENT manpages

This page displays the COHERENT manpage for lp [Spool a file for printing].

List of available manpages
Index


lp -- Command

Spool a file for printing
lp [-dprinter] [-t title] [-ncopies] [-R page [page]] [-Smws] file ...

The  command lp  spools text  for  printing.  If  you name  no file  on its
command line, lp spools what it receives from the standard input.

lp  prefaces the  spooled text  with a header  that describes,  among other
things, on what device you want  to print the text; then it copies the text
into directory  /usr/spool/mlp/queue, where it remains  until it is removed
by  the  printer  daemon lpsched.  The  spooled  text,  which may  comprise
multiple files, plus its header is called a job.

The following describes the header with which lp prefaces each file:

  Offset   Length  Description
     0       14    User who spooled the file
    14       14    Name of the printer on which to print file
    28       10    Type of file (application specific)
    38       3     Length of output page (default, 66 lines)
    41       4     Number of pages (maximum, 9,999)
    45       2     Number of copies to print (default, one; maximum, 99)
    47       1     Set life expectancy of job (see below)
    48       1     If `M', send user mail after printing
    49       1     If `W', write user after printing
    50       14    Name of data base (application specific)
    64       14    Name of program (application specific)
    78       10    Date/time stamp (no. of seconds since 1/1/1970)
    88       60    Description or title

Note that the  fields marked ``application specific'' are not  use by lp or
lpsched. Rather, they are  available to applications, such as filters, that
may be used with lp to print files.

The ``life expectancy'' byte of the header defines how long the job remains
alive  in /usr/spool/mlp/queue.  Jobs  labeled T  (temporary)  live for  30
minutes  after being  spooled;  those labeled  S (short-term)  live for  24
hours; and  those labeled L  (long-term) live for  72 hours.  Once  a job's
life expectancy  has expired, the  printer daemon lpsched  removes it.  The
default is life  expectancy is S.  To change the  life expectancy of a job,
use the command chreq. You  can also change the above default ``lifetimes''
by editing the file /usr/spool/mlp/controls.

When lp creates a job, it gives the job a seven-character name.  The name's
first character gives  the status of the job: R  indicates that the file is
being printed or is pending printing,  whereas r indicates that the job has
already  been  printed.   The second  character  gives  the job's  priority
status, from  0 through  9: zero gives  highest priority, nine  the lowest.
The default  priority is 2.   The last five  characters of the  name give a
zero-padded sequence number.  To change a job's status or priority, use the
command  chreq; or  the  system administrator  can alter  either simply  by
renaming the file.

lp recognizes the following options:

-R request
          Print a  job beginning from the first  page and continuing either
          to the  second page or to  the end of the  document (if no second
          page  is  specified).   Note  that  the  printer  daemon  lpsched
          identifies  pages by  counting lines  of  input, so  this feature
          works only  with straight text.  It does  not work correctly with
          ``cooked'' input, such as files of PostScript or PCL.

-S9       Shut down the spooler daemon lpsched.

-dprinter Print the job on printer.

-m        Send mail to the user once the spooled job has been printed.

-ncopies  Print copies copies of the job.

-s        Silent -- do  not acknowlege submissions.  Normally, lp writes on
          the  standard output  the  sequence number  of the  job you  just
          spooled.  You  can use that number  to remove or abort  a job, or
          otherwise manipulate it.

-t title  Give this job title.  This is the title that appears in the queue
          displayed by the command lpstat.

-w        Write  a message  on  the user's  screen  once the  job has  been
          printed.

lp sends you mail if one of your print jobs failed due to an error.

For more information on lp and  its related commands, see the Lexicon entry
printer.

See Also

chreq,
commands,
controls,
lp [device driver],
lpadmin,
lpsched,
pclfont,
printer

Notes

Because most  users find banners annoying rather than  helpful, lp does not
print   banners.   It   ignores  the  option   -b,  which   under  orthodox
implementations of  lp prints  a banner  page.  Applications that  desire a
banner  page  should make  provision  for it  in  the individual  printer's
control file.  For details, see the Lexicon entry for the command lpadmin.

If you wish to use lp to download a PCL bitmapped font to your PCL printer,
you must first process the font  with the command pclfont. For details, see
its Lexicon entry.