Linux and Unix lp command
Prints a file on System V systems.
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:
|-n number||The number of files to be printed.|
|-o options||Different print options:
|-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.|
Prints the file myfile.txt