The lprm Command


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 verify the results, you can use lpq to check the queue again:

 >lpq Ppr1 

You should see the job you specified terminated and no longer active.

That's it for printing. As I have mentioned before, it is imperative that you read more about this if you really want to master printing in Unix. Unix printing is not difficult and can be learned simply by mastering the concepts brought up in this lesson, and expanding on them. Make sure you consult the Internet and man pages for more information on printing.



    SAMS Teach Yourself Unix in 10 Minutes
    Sams Teach Yourself Unix in 10 Minutes (2nd Edition)
    ISBN: 0672327643
    EAN: 2147483647
    Year: 2005
    Pages: 170

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net