Linux lpq command
The Linux lpq command is used to view the status of a print queue. This program can display the printer queue status and the print jobs it contains.
Syntax
lpq [l] [P] [user]
Parameter description:
- -P Specify a printer; otherwise, use the default printer or the printer specified by the environment variable PRINTER
- -l Print information about all files that make up the job.
Examples
An empty queue for the system default printer "printer".
$ lpq printer is ready no entries
If no printer is specified beforehand (using the -P option), the system will display the default printer. If you send a print job to the printer and then check the print queue, you will see a list like the following.
$ 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)Other Extensions
Linux Command Encyclopedia