English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Linux lpq Command

Linux Command大全

The Linux lpq command is used to view the status of a print queue. This program can view the status of the printer queue and the print jobs it contains.

Syntax

lpq [l] [P] [user]

Parameter Description:

  • -P Specifies a printer; otherwise, the default printer or the printer specified by the environment variable PRINTER is used

  • -l Prints information about all the files that make up the job...

Online Examples

is an empty queue for the system default printer printer.

$ lpq  
printer is ready  
no entries

If the printer was not specified in advance (using-Option P), the system will display the default printer. If you send a print job to the printer and then view the print queue, you will see the following list.

$ ls *.txt | pr -3 | lp  
request id is printer-603 (1 file(s))  
[me@linuxbox ~]$ lpq  
printer is ready and printing  
Rank    Owner   Job     File(s)                         Total Size  
active  me      603     (stdin)

Linux Command大全