Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cancel 10000 print jobs 1

Status
Not open for further replies.

Tranbo

IS-IT--Management
Apr 14, 2010
75
0
0
US
how do I cancel all the print jobs all at once? it is SCO-OS6

lpstat -o PrinterName | while read a b; do cancel $a; done

-this command only cancel 1 jobs and hung up. I don't know how to insert the sleep command in the loop as suggested in prior post.

# lpstat -o SRHP | while read a b; do cancel $a; done
request "SRHP-582992" canceled



 
how to insert the sleep command in the loop
lpstat -o SRHP | while read a b; do cancel $a; [!]sleep 1; [/!]done

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
# lpstat -o JCHP1 | while read a b; do cancel $a; sleep 1; done
request "JCHP1-608628" canceled

Still not working ...I have over 5000 print jobs in the queue right now.

I had a scripts but it doesn't work until I get my queue to smaller size.

here is the script with run error

# lpcancel
lpcancel: /bin/cancel: arg list too long
#

Contents of lpcancel:

cancel `lpstat -o JCHP1|awk '{ print $1 '}`



 

How do I put

"cancel JCHP1"

to the script to create a loop? because this is work

cancel JCHP1
request "JCHP1-608851" canceled

 
I got it :) work like a champ

# while x=0; do cancel JCHP1; sleep 2; done
request "JCHP1-609224" canceled
request "JCHP1-609225" canceled
request "JCHP1-609226" canceled
request "JCHP1-609227" canceled
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top