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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cancel print jobs 3

Status
Not open for further replies.

rdmusc

Technical User
Jan 8, 2004
14
US
I have about 400 print jobs. I realize I can cancel each one with the 'cancel' command, but there must be a way to cancel all jobs with one stroke. Where are the print jobs located? /usr/???? /var/????

Any help would be appreciated.
 
Try something like this:
lpstat -o PrinterName | while read a b; do cancel $a; done

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Didn't work. System seems to hang up. I have to kill the lpstat process from another terminal to get out of it. No print jobs are canceled.
 
When you do a cancel manually, did it work ?
If yes, just add a sleep command after the cancel inside the loop.

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Still hangs up. This is the feedback I get when I run that command:

UX:cancel: WARNING: Request "d_matrix-63" is done.
TO FIX: It is too late to do anything with it.


Then I have to open up another session to kill the lpstat process to get out of it. This is what I get when I manually cancel 1 job:

/home/itnapp > cancel d_matrix-377
request "d_matrix-377" canceled


I wonder if the 'request "d_matrix-377" canceled' line is confusing the loop.
 
Ok. Success finally. I rebooted the system, then looked at the jobs and they were gone.

Thanks...

Richard M.
 
You may consider creating a ghost printer, say null, with /dev/null as device.
Then you may do something like this:
/usr/lib/lpmove d_matrix null

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Hi!
if you would like to delete print jobs, only go into scoadmin, select Printers, and in the 2nd menu select Pritn Job Manager. A list of jobs appairs on the screen. So at this point, U have the possibility to remove all! That's all! :D

Ciao! :)

Francesco



Francesco Cabigliera "Tadan"
----------------------------
Italiano Amateur Radio Station
----------- IW3IDS ---------
On Echolink - APRS Active
 
Hi,
You can also ' destroy ' all waiting files in the /var/spool/lpd/nameofprintqueue folder.
Hope this will help.
Jack.
 
Thanks for all of the replies. I am new at unix and learned a little more about how this stuff works from the responses.

tadan: Your example example seems to be the easiest. Doesn't require the use of any command line entries.

PHV: Since I had to remove ALL jobs, that command is also very efficient. Not sure I would be able to remember it the next time I needed it. I saved it just in case. Also, I like the functionality of the 'read' command. I have other uses for that.

kang: I couldn't find the lpd directory under spool. There was an lp directory, but nothing in it.

Thanks all.
 
you will see /var/spool/lpd when you have configured remote printing. (or /usr/spool/lpd)
 
Hi! :)

[cite on]
Thanks for all of the replies. I am new at unix and learned a little more about how this stuff works from the responses.

tadan: Your example example seems to be the easiest. Doesn't require the use of any command line entries.
[cite off]

Sure! Any command line.
If you type scoadmin <return> you enter inside the sco administration panel ! Into this there are many opts. like manage account, manage network, manage backup system ... and also manage printer and print jobs!!
If you type scoadmin -t <return> you have the possibility to view a list of all single management modules! For example if you type scoadmin Print Job Manager (be aware ... case sens.), you enter immidatley into the admin module of printer jobs!
Have you tried my simple solution? ... :-D
If you're not 100% convinced about this, write me in email, and I send U some screenshots!
That's all! :-D

Sorry for my simple english but I think U understand all the same! :-D


ciao

Francesco



Francesco Cabigliera "Tadan"
----------------------------
Italiano Amateur Radio Station
----------- IW3IDS ---------
On Echolink - APRS Active
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top