There are a few different commands that can be used to sent print jobs to the printer.
After sending the print job to the printer, the lpq command can be used to view the print job in the queue. The lpq command without any options shows every print queue.
lpq . . . HP-Photosmart-C6200-seriesCMD:PCL is ready Rank Owner Job File(s) Total Size active root 1 formatted-file 1024 bytes active root 3 Example Job Name 1024 bytes HP-Lasterjet-4000 is ready Rank Owner Job File(s) Total Size active root 2 formatted-file 1024 bytes
The -P option can be used to specify a certain printer or queue.
lpq -P HP-Lasterjet-4000 . . . HP-Lasterjet-4000 is ready Rank Owner Job File(s) Total Size active root 2 formated-file 1024 bytes
Cancelling a print job
If some problem occurs, and the print job doesn't print, we can cancel the print jobs in the queue. The lpq cancel command with no options cancels the current print job on the default printer.
The lpq cancel -a command without any additional options cancels every print job on every printer being managed by CUPS in the network.
lpq cancel -a
The lpq cancel -a command followed by the printer name will cancel every print job on a certain printer.
lpq cancel -a printer_name
The lprm command can be used to remove print jobs.