[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [K12OSN] cancel print jobs



Why not something simple like this:

  cancel -a -d bigprinter

That will remove ALL print jobs for the 'bigprinter' destination.

You can configure sudo if you want to give the cancel capability to non-root users.

Jim McQuillan
jam Ltsp org



Brian Chivers wrote:
Will Hatch wrote:
Hi all,

This might be a bit off topic; how do you cancel all print jobs from the
command line?  I have some students that think if you continue to click
"print" that their assignment will eventually appear from the printer.
I assume you have to be logged in as root.  Then what? Thanks!

_______________________________________________
K12OSN mailing list
K12OSN redhat com
https://www.redhat.com/mailman/listinfo/k12osn
For more info see <http://www.k12os.org>

I use this on the printserver

for i in `lpstat -o|grep printername|awk '{print $1}'`; do cancel $i; done

So if your printer was called `bigprinter` you'd have

for i in `lpstat -o|grep bigprinter|awk '{print $1}'`; do cancel $i; done


I've actually set this up as a custom job in Webmin to make it easier to run.

Brian

---------------------------------------------------------------
The views expressed here are my own and not necessarily the views of Portsmouth College _______________________________________________
K12OSN mailing list
K12OSN redhat com
https://www.redhat.com/mailman/listinfo/k12osn
For more info see <http://www.k12os.org>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]