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 lprm Command

If you send a job to a printer and it isn't what you wanted, you can cancel it. This is common in times when you are rushing and you press Print and realize, “I didn't want to do that.” Now, you don't have to be a tree-killing-paper-ream-eating-user, and you can quickly stop that wasteful 1,000-page print job you didn't mean to send. The lprm command enables you to remove items from the printer queue. This is how you use it:

If you need to use lprm, follow these steps:

1.
Use the lpq command to find the job ID number that you want to remove.
2.
Invoke lprm with the following syntax: lprm -P<printer name> <job ID>.

For example, if you wanted to remove job #15 from the queue in the printer pr1, you can type

					>lprm –Ppr1 15
				

To ...

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