lp (Unix)

from Wikipedia, the free encyclopedia

The lp command is used to manage print jobs and is used on Unix systems. The name of the program is derived from " l ine p rinter ", but the command is used for every type of printer. This command was originally part of the UNIX System V printing system and was used for some time as a distinguishing feature between UNIX System V and BSD .

However, there are different meanings of lp , briefly summarized here:

  • lp is the command for printing under UNIX System V .
  • CUPS uses lp as a program to manage its print jobs.
  • The LPRng project provides lp as a wrapper around the lpr command .
  • Plan 9 also contains a command called lp , which, however, differs from that of System V in terms of functionality.

Options

Here is a list of the options available from lp :

  • -E forces encryption when connecting to the print server .
  • -c For backward compatibility only . On supported systems, this option forces a copy of the document into the spool directory.
  • -d printer sends the job to printer
  • -h host [: port] selects a server . The default value is " localhost " or the environment variable of the CUPS server.
  • -i job number selects the print job with the job number for processing.
  • -m sends an email when the print job is executed. (not CUPS 1.1)
  • -n copies set the number of copies. (Value 1-100)
  • -o option_name = option_value sets the option_name option with the option_value value .
  • -q priority prints the job with priority priority . (Value 1 (lowest) to 100 (highest); default value is 50)
  • -s "Quiet mode": No output of the print job numbers.
  • -t name names the print job.
  • -u Username cancels all requests made by Username .
  • -H option controls the time of printing and cancellation of a job. The following values ​​are possible for option :
    • HH: MM prints at a specific time.
    • "immediate" prints the job immediately.
    • "hold" stops the print job.
    • "resume" resumes a stopped print job that was selected with -i .
    • "restart" prints the job that was selected with -i again.
  • -P Pages prints only pages of a document. Multiple pages are separated by commas, areas are indicated by hyphens. Example: 1.4-7.9

See also

Individual evidence

  1. man page