IPB
>  Man Pages > Unix > Solaris 10 11/06 > Section 1 > lp man page

lp man page

Section 1 - Solaris 10 11/06 Man Pages

Other operating system man pages available here


Advanced Search

Hopefully, this page is exactly what you are looking for, but if not, you can always find further assistance on Unix/Linux Forum!





User Commands                                               lp(1)



NAME
     lp - submit print request

SYNOPSIS
     lp [-c] [-m] [-p] [-s] [-w] [-d destination]  [-f form-name]
     [-H special-handling] [-n number] [-o option] [-P page-list]
     [-q priority-level]  [-S character-set  |  print-wheel]   [-
     t title] [ -T content-type [-r]] [-y mode-list] [file...]

     lp  -i request-ID...   [-c]   [-m]   [-p]   [-s]   [-w]   [-
     d destination]   [-f form-name]   [-H special-handling]   [-
     n number] [-o option] [-P page-list] [-q priority-level]  [-
     S character-set | print-wheel]  [-t title] [ -T content-type
     [-r]] [-y mode-list]

DESCRIPTION
     The lp utility submits  print  requests  to  a  destination.
     There are two formats of the lp command.

     The first form of lp  prints  files  (file)  and  associated
     information  (collectively  called a print request). If file
     is not specified, lp  assumes  the  standard  input.  Use  a
     hyphen  (-)  with  file to specify the standard input. Files
     are printed in the order in which they appear on the command
     line.

     The second form of lp changes print  request  options.  This
     form  of  lp  can  only  be  used on a Solaris 2.6 Operating
     Environment or compatible versions of the LP  print  server.
     The  print  request  identified  by  request-ID  is  changed
     according to the printing options  specified.  The  printing
     options  available are the same as those with the first form
     of the lp. If the request has finished printing when the  lp
     command  is executed, the change is rejected. If the request
     is in the process of printing, it will be stopped  and  res-
     tarted  from  the  beginning  (unless the -P option has been
     given).

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

OPTIONS
     Printers that have a 4.x or BSD-based print server  are  not
     configured  to  handle  BSD  protocol extensions. lp handles
     print requests sent to such  destinations  differently  (see
     NOTES).

     The following options are supported:





SunOS 5.10          Last change: 18 Mar 2006                    1






User Commands                                               lp(1)



     -c                      Copies file before printing.

                             Unless -c is specified, users should
                             not remove any file before the print
                             request  has   completely   printed.
                             Changes made to file after the print
                             request is made  but  before  it  is
                             printed  will  be  reflected  in the
                             printed output. file will be  linked
                             (as opposed to copied).



     -d destination          Prints file on a  specific  destina-
                             tion.  The  -d option is used to set
                             the destination only when the job is
                             first   created.   (Note:   To  move
                             existing jobs to a different  desti-
                             nation, see lpmove(1M).) destination
                             can be either a printer or  a  class
                             of   printers   (see   lpadmin(1M)).
                             Specify destination using atomic  or
                             POSIX-style     (server:destination)
                             names. See standards(5) for informa-
                             tion regarding POSIX.



     -f form-name            Prints file  on  form-name.  The  LP
                             print  service ensures that the form
                             is mounted on the printer. The print
                             request  is  rejected if the printer
                             does  not  support   form-name,   if
                             form-name  is  not  defined  for the
                             system,  or  if  the  user  is   not
                             allowed   to   use   form-name  (see
                             lpforms(1M)).



     -H special-handling     Prints the print  request  according
                             to  the  value  of special-handling.
                             The    following    special-handling
                             values are acceptable:


                             hold

                                 Do not print the  print  request
                                 until  notified. If printing has
                                 already begun,  stop  it.  Other
                                 print  requests will go ahead of



SunOS 5.10          Last change: 18 Mar 2006                    2






User Commands                                               lp(1)



                                 a request that has been  put  on
                                 hold  (held print request) until
                                 the print request is resumed.




                             resume

                                 Resume a held print request.  If
                                 the  print  request had begun to
                                 print when held, it will be  the
                                 next   print   request  printed,
                                 unless it is  superseded  by  an
                                 immediate print request.



                             immediate

                                 Print the print request next. If
                                 more  than  one print request is
                                 assigned, the most recent  print
                                 request  is  printed  next. If a
                                 print   request   is   currently
                                 printing on the desired printer,
                                 a hold request must be issued to
                                 allow  the  immediate request to
                                 print. The immediate request  is
                                 only available to LP administra-
                                 tors.




     -i request-ID           Changes  options   for   the   print
                             request  identified  by  request-ID.
                             There must be a space between -i and
                             request-ID. This option applies only
                             to jobs that are in a local queue on
                             a print server.



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







SunOS 5.10          Last change: 18 Mar 2006                    3






User Commands                                               lp(1)



     -n number               Prints a specific number  of  copies
                             of  file. Specify number as a digit.
                             The default for number is 1.



     -o option               Specifies printer-dependent options.
                             Specify  several options by specify-
                             ing -o  option  multiple  times  (-o
                             option   -o   option  -o  option  ).
                             Printer-dependent options  may  also
                             be  specified using the -o keyletter
                             once, followed by a list of  options
                             enclosed in double quotes (-o"option
                             option   option").   The   following
                             options are valid:

                             nobanner

                                 Does not  print  a  banner  page
                                 with  the  request.  This option
                                 can  be  disallowed  by  the  LP
                                 administrator.

                                 On a system that  is  configured
                                 with  Trusted Extensions, use of
                                 this   option    requires    the
                                 solaris.print.nobanner  authori-
                                 zation.




                             nofilebreak

                                 Prints  multiple  files  without
                                 inserting  a  form  feed between
                                 them.



                             nolabels

                                 On a system that  is  configured
                                 with  Trusted Extensions, speci-
                                 fies suppression of page  header
                                 and  footer  labels. Use of this
                                 option       requires        the
                                 solaris.print.unlabeled authori-
                                 zation.





SunOS 5.10          Last change: 18 Mar 2006                    4






User Commands                                               lp(1)



                             length=numberi | numberc | number

                                 Prints the  print  request  with
                                 pages  of  a  specific length in
                                 inches, centimeters,  or  number
                                 of  lines.  Append  the letter i
                                 for inches or c for centimenters
                                 to  number.  Indicate the number
                                 of lines  by  specifying  number
                                 alone.   length=66  indicates  a
                                 page   length   of   66   lines.
                                 length=11i   indicates   a  page
                                 length     of     11     inches.
                                 length=27.94c  indicates  a page
                                 length of 27.94 centimeters.

                                 This option may not be used with
                                 the -f option.



                             width=numberi | numberc | number

                                 Prints the  print  request  with
                                 pages  of  a  specific  width in
                                 inches, centimeters,  or  number
                                 of  columns. Append the letter i
                                 for inches or c for  centimeters
                                 to  number.  Indicate the number
                                 of columns by specifying  number
                                 alone. width=65 indicates a page
                                 width of 65 columns.  width=6.5i
                                 indicates  a  page  width of 6.5
                                 inches.  width=10c  indicates  a
                                 page width of 10 centimeters.

                                 This option may not be used with
                                 the -f option.



                             lpi=number

                                 Prints the  print  request  with
                                 the  line  pitch  set  to number
                                 lines in an inch. Use number  to
                                 specify  the  number of lines in
                                 an inch.

                                 This option may not be used with
                                 the -f option.




SunOS 5.10          Last change: 18 Mar 2006                    5






User Commands                                               lp(1)



                             cpi=n|pica|elite|compressed

                                 Prints the  print  request  with
                                 the   character   pitch  set  to
                                 number characters  in  an  inch.
                                 Use number to specify the number
                                 of characters in  an  inch.  Use
                                 pica  to  set character pitch to
                                 pica (10 characters  per  inch),
                                 or  elite to set character pitch
                                 to  elite  (12  characters   per
                                 inch)   Use  compressed  to  set
                                 character pitch to as many char-
                                 acters  as  the printer can han-
                                 dle. There is no standard number
                                 of  characters  per inch for all
                                 printers; see the terminfo data-
                                 base  (see  terminfo(4)) for the
                                 default character pitch for your
                                 printer.  This option may not be
                                 used with the -f option.



                             stty=stty-option-list

                                 Prints the request using a  list
                                 of  options  valid  for the stty
                                 command (see  stty(1).   Enclose
                                 the  list  in single quotes (`')
                                 if it contains blanks.





     -P page-list            Prints the pages specified in  page-
                             list  in  ascending  order.  Specify
                             page-list as a of range of  numbers,
                             single page number, or a combination
                             of both.

                             The -P option can only  be  used  if
                             there  is a filter available to han-
                             dle it; otherwise, the print request
                             will be rejected.



     -p                      Enables notification  on  completion
                             of  the  print  request. Delivery of
                             the  notification  is  dependent  on



SunOS 5.10          Last change: 18 Mar 2006                    6






User Commands                                               lp(1)



                             additional software.



     -q priority-level       Assigns the print request a priority
                             in    the   print   queue.   Specify
                             priority-level as an integer between
                             from 0 and 39. Use 0 to indicate the
                             highest priority; 39 to indicate the
                             lowest  priority.  If no priority is
                             specified, the default priority  for
                             a  print  service is assigned by the
                             LP administrator. The LP administra-
                             tor may also assign a default prior-
                             ity to individual users.



     -s                      Suppresses the display  of  messages
                             sent from lp.



     -S character-set |      Prints   the   request   using   the
     -S print-wheel          character-set  or print-wheel.  If a
                             form was requested  and  requires  a
                             character  set  or print wheel other
                             than the one specified with  the  -S
                             option,  the  request  is  rejected.
                             Printers   using   mountable   print
                             wheels  or  font  cartridges use the
                             print  wheel   or   font   cartridge
                             mounted  at  the  time  of the print
                             request, unless  the  -S  option  is
                             specified.

                             Printers  Using  Print  Wheels:   If
                             print wheel is not one listed by the
                             LP administrator as  acceptable  for
                             the  printer the request is rejected
                             unless the print  wheel  is  already
                             mounted on the printer.

                             Printers Using  Selectable  or  Pro-
                             grammable  Character Sets: If the -S
                             option is not specified, lp uses the
                             standard     character    set.    If
                             character-set is not defined in  the
                             terminfo  database  for  the printer
                             (see  terminfo(4)),  or  is  not  an
                             alias  defined by the LP administra-
                             tor, the request is rejected.



SunOS 5.10          Last change: 18 Mar 2006                    7






User Commands                                               lp(1)



     -t title                Prints a title on the banner page of
                             the  output. Enclose title in quotes
                             if it contains blanks. If  title  is
                             not  not  specified, the name of the
                             file is printed on the banner page.



     -Tcontent-type [-r]     Prints the request on a printer that
                             can  support  the specified content-
                             type. If  no  printer  accepts  this
                             type directly, a filter will be used
                             to  convert  the  content  into   an
                             acceptable type. If the -r option is
                             specified,  a  filter  will  not  be
                             used.  If  -r  is  specified, and no
                             printer  accepts  the   content-type
                             directly,  the  request is rejected.
                             If the content-type is  not  accept-
                             able to any printer, either directly
                             or with a  filter,  the  request  is
                             rejected.



     -w                      Writes a message on the user's  ter-
                             minal  after  the  files  have  been
                             printed. If the user is  not  logged
                             in, then mail will be sent instead.



     -y mode-list            Prints the request according to  the
                             printing  modes listed in mode-list.
                             The allowed values for mode-list are
                             locally defined.

                             This option  may  be  used  only  if
                             there  is a filter available to han-
                             dle it; otherwise, the print request
                             will be rejected.



OPERANDS
     The following operand is supported:

     file                    The name of the file to be  printed.
                             Specify  file  as a pathname or as a
                             hyphen (-) to indicate the  standard
                             input.  If file is not specified, lp
                             uses the standard input.



SunOS 5.10          Last change: 18 Mar 2006                    8






User Commands                                               lp(1)



USAGE
     See largefile(5) for the description of the behavior  of  lp
     when encountering files greater than or equal to 2 Gbyte ( 2
    **31 bytes).

ENVIRONMENT VARIABLES
     See environ(5) for descriptions of the following environment
     variables  that  affect  the  execution of lp: LANG, LC_ALL,
     LC_CTYPE, LC_MESSAGES, NLSPATH, and PATH.

     LC_TIME         Determine the format and  contents  of  date
                     and  time strings displayed in the lp banner
                     page, if any.



     LPDEST          Determine the  destination.  If  the  LPDEST
                     environment variable is not set, the PRINTER
                     environment variable shall be used.  The  -d
                     dest  option  takes  precedence over LPDEST.
                     Results are undefined when -d is not  speci-
                     fied and LPDEST contains a value that is not
                     a valid destination name.



     PRINTER         Determine the output device or  destination.
                     If  the LPDEST and PRINTER environment vari-
                     ables are not  set,  an  unspecified  output
                     device  is  used. The -d dest option and the
                     LPDEST environment variable shall take  pre-
                     cedence  over PRINTER. Results are undefined
                     when -d is not specified, LPDEST  is  unset,
                     and  PRINTER  contains a value that is not a
                     valid device or destination name.



     TZ              Determine the  timezone  used  to  calculate
                     date  and  time  strings displayed in the lp
                     banner page, if any. If TZ is unset or null,
                     an  unspecified  default  timezone  shall be
                     used.



EXIT STATUS
     The following exit values are returned:

     0               Successful completion.





SunOS 5.10          Last change: 18 Mar 2006                    9






User Commands                                               lp(1)



     non-zero        An error occurred.



FILES
     /var/spool/lp/*                 LP print queue.



     $HOME/.printers                 User-configurable    printer
                                     database.



     /etc/printers.conf              System printer configuration
                                     database.



     printers.conf.byname            NIS        version        of
                                     /etc/printers.conf.



     printers.org_dir                NIS+       version        of
                                     /etc/printers.conf.



ATTRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:

     ____________________________________________________________
    |       ATTRIBUTE TYPE        |       ATTRIBUTE VALUE       |
    |_____________________________|_____________________________|
    | Availability                | SUNWpcu                     |
    |_____________________________|_____________________________|
    | CSI                         | Enabled (see NOTES)         |
    |_____________________________|_____________________________|
    | Interface Stability         | Standard                    |
    |_____________________________|_____________________________|


SEE ALSO
     cancel(1), enable(1), lpq(1B), lpr(1B), lprm(1B), lpstat(1),
     mail(1),    postprint(1),    pr(1),   stty(1),   accept(1M),
     lpadmin(1M),    lpfilter(1M),    lpforms(1M),    lpmove(1M),
     lpsched(1M),    lpshut(1M),    lpsystem(1M),    lpusers(1M),
     nsswitch.conf(4),   printers(4),   printers.conf(4),    ter-
     minfo(4),  attributes(5),   environ(5),  largefile(5), stan-
     dards(5)



SunOS 5.10          Last change: 18 Mar 2006                   10






User Commands                                               lp(1)



NOTES
     CSI-capability assumes that printer names  are  composed  of
     ASCII characters.

     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.

     Printers that have a 4.x or BSD-based print server. are  not
     configured  to  handle  BSD  protocol extensions. lp handles
     print requests sent to such printers in the following ways:

     1.  Print requests with more than 52 filenames will be trun-
         cated to 52 files. lp displays a warning message.


     2.  The -f, -H, -o, -P, -p, -q, -S, -T, and -y  options  may
         require  a protocol extension to pass to a print server.
         If lp cannot handle the print  request,  it  displays  a
         warning message.

         LP administrators enable protocol extensions by  setting
         a  printer's bsdaddr entry in /etc/printers.conf. Chang-
         ing the bsdaddr entry in /etc/printers.conf to:


         destination:bsdaddr=server,destination,Solaris

         generates a set of BSD print  protocol  extensions  that
         can  be processed by a Solaris print server. lp supports
         only Solaris protocol extensions at this time.























SunOS 5.10          Last change: 18 Mar 2006                   11





Man(1) output converted with man2html and wrapped by fishsponge

This page was generated on Wed Sep 12 21:37:10 GMT 2007

Your favourite pages:

No pages logged yet.
Trying to save cookie...

Top 10 most popular pages:

CPAN man page (4210 hits)
(Suse Linux 10.1)

ssh man page (4117 hits)
(Suse Linux 10.1)

svn man page (2480 hits)
(FreeBSD 6.2)

adv_cap_autoneg man page (1782 hits)
(Solaris 10 11_06)

startproc man page (1711 hits)
(Suse Linux 10.1)

sqlite3 man page (1663 hits)
(openSUSE 10.2)

signal man page (1393 hits)
(Suse Linux 10.1)

pprosetup man page (1241 hits)
(Solaris 10 11_06)

netcat man page (1237 hits)
(Suse Linux 10.1)

ssh-socks5-proxy-connect man page (1126 hits)
(Solaris 10 11_06)

Useful Links

Go Back

Visitor Statistics


Valid XHTML 1.0 Transitional     Valid CSS!

Partners: Cambridge Plus :: Pyrenees Accomodation :: 3D Mechanical Design :: <Link Available>
Unix Man Pages / Linux Man Pages :: HiFi Forum :: SIP VoIP Phone & Provider Reviews :: UNIX/Linux Forum Archives

More info on advertising on Unix/Linux Forum