Latest web development tutorials

Linux lpq command

Linux command Daquan Linux command Daquan

Linux lpq command is used to view the status of a print queue, the program can view the printer queue status and print job contains.

grammar

lpq [l] [P] [user]

Parameter Description:

  • -P Specify a printer, otherwise the default printer or the printer specified by the environment variable PRINTER
  • -l print all files of the composition of the job. .

Examples

A queue is empty, the default printer of the printer.

$ lpq  
printer is ready  
no entries 

If you have not previously specified printer (using the -P option), the system will display the default printer. If you send the print job to the printer, and then view the print queue, you'll see the list below.

$ 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 Daquan Linux command Daquan