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               100 bytes
					2nd    erika       28   anyfile.txt              30023 bytes
				

This example shows that there are currently two different jobs in the printer queue for pr1. One is owned by myself (rob), and the user erika owns the second. Each job is ranked; this shows the order in which it will print. The names of the files being printed are also shown, as are the size and job ID number.

So now you know how to start a print job and check the status of it, but what if you wanted to stop or cancel your print job? What do you do?

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.217.186