Sunday 10 May 2020

The Unix/Linux lpstat command

Linux Tutorial and Material, Linux Certifications, Linux Study Materials, Linux Exam Prep

The Linux lpstat command lets you look at the progress of your print request(s). The name "lpstat" stands for "line printer statistics".

lpstat command examples


The "lpstat" command, used with no options, may return no output if there are no print jobs queued.

lpstat

It's generally better off to use an option with "lpstat". The "lpstat" command with the "-t" option gives you total information about the printer status. This option is generally the most useful, but the printout can be lengthy if you have a large number for printers configured.

lpstat -t

Linux Tutorial and Material, Linux Certifications, Linux Study Materials, Linux Exam Prep
To look at Linux printer queue information for a specific printer, use the -p option. Here's an example of looking at the long list of output information (-l option) for a printer named "Sales":

lpstat -p Sales -l

The -r option shows whether the print scheduler is currently on or off:

lpstat -r

Finally, the -u option shows print request status information for a given user. Here's what the command looks like when looking at the printer queue information for a user named "fred":

lpstat -u fred

Related Posts

0 comments:

Post a Comment