O'Reilly logo

SAMS Teach Yourself Unix in 10 Minutes by Robert Shimonski

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The lpq Command

You send the job to the printer, what next? Well, the print job can be checked to see if it's in fact in the queue and being processed by the print server. After you've sent a job to the printer, especially if it is a network printer located a distance away, you will want to verify the completion of a job so that you know if you need to send it again or check for other problems.

To check the status of a job, you'll want to look at the queue for the printer to which you submitted the job. You do this with the lpq -P<printer name> command. Once again, if there is only a single printer on your system, you can probably just issue lpq by itself.

Type the following:

					>lpq –Ppr1
					Rank   Owner      Job  Files                     Total Size
					1st rob 27 testfile.txt ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required