Computer Hope

Other Pages

Home
Site map
Computer help

Dictionary
News
Q&A
What's new

Tools

E-mail this page
Print Preview
Edit this page



 

Linux / Unix lp command

Quick links

About lp
Syntax
Examples
Related commands
Linux / Unix main page

About lp

Prints a file on System V systems.

Syntax

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

-c Makes a copy of the file that is being printed.
-m Sends e-mail when the printing is done.
-p Enables notification on completion of the print request. Delivery of the notification is dependent on additional software.
-s Suppresses the display of messages sent from lp.
-w Displays message on screen when printing is done.
-d destination The name of the printer that you want your printing to print on.
-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
-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 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 immedi ate request is only available to LP

 

-n number The number of files to be printed.
-o options Different print options:

 

nobanner Does not print the banner with username and filename information.
nofilebreak Does not start each new file on a new line
cpi=pitch Characters per inch.
lpi=lines  Lines per inch (default=6)
length=inchesi   The number of x printed lines per inch (the i must be at the end.)
lenth=linesl Prints pages that are x lines long(must have l at the end.)
width=chars Prints pages the max of chars per line
width=inchesi Prints pages the max of x inches wide.

 

-p pagenumbers The number of the pages that you want to print in ascending order. Specify pagenumbers as a range of numbers, single page number, or a combination of both.
-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 administrator may also assign a default priority to individual users.
-S character-set | print-wheel Prints the request using the 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 Programmable 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, or is not an alias defined by the LP administrator, the request is rejected.

-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.
-T content-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 acceptable to any printer, either directly or with a filter, the request is rejected.
-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 handle it; otherwise, the print request will be rejected.

filename The name of the file that you want to print.

Examples

lp myfile.txt - Prints the file myfile.txt

Related commands

cancel
enable
lpq
lpr
lprm
lpstat
mail
pr
stty

 

Index

Category:
Linux / Unix

Companies:
Click here

Related Pages:

 

Resolved

Were you able to locate the answer to your questions?

Home - Computer help - Contact - Dictionary - Links
Link to Computer Hope - Bookmark Computer Hope