To check the default print queue, we can use the lpq comand:
$lpq lp is ready and printing Rank Owner Job Files Total Size active markst 35 book.ps 39597 bytes 1st markst 36 ex1/ex1.dvi 3400 bytes $
If we want to check another printer queue, we can again add the -P flag:
$lpq -Praw waiting for raw to become ready (offline ?) Rank Owner Job Files Total Size 1st markst 0 ex1/ex1.dvi 3400 bytes $
We also gain some status information from the lpq command. It tells us if a printer is printing, currently off-line, or if data is being sent to a remote printer.