HylaFAX The world's most advanced open source fax server

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

Re: [hylafax-users] Remove all faxes from queue?



On Thu, May 15, 2003 at 09:29:08AM -0400, Sam Kalet wrote:
> > Is there an easy way to remove all the faxes from the queue besides:
> > 
> > faxrm 1 2 3 4 5 ... 200
> > 
> > Can any one help me with an example perl or shell script to loop 
> > through the required range and kill each job one at a time?
> 
> If you know what the range is, you can do something like:
> 
> #!/bin/sh
> START=0
> END=200
> 
> while [ $START -le $END ] ; do
> faxrm $START
> START=`expr $START + 1`
> done

man seq

> Probably a better way to do this is to operate on the jobs actually in the send
> queue:
> 
> #!/bin/sh
> Q=/var/spool/hylafax/sendq
> cd $Q
> for x in `ls -1 q* | cut -d q -f 2` ; do
> faxrm $x
> done

Concur; I've done this with LP over the years, too: I usually name it
"*flush".

Cheers,
-- jra
-- 
Jay R. Ashworth                                                jra@baylink.com
Member of the Technical Staff     Baylink                             RFC 2100
The Suncoast Freenet         The Things I Think
Tampa Bay, Florida        http://baylink.pitas.com             +1 727 647 1274

   "If you don't have a dream; how're you gonna have a dream come true?"
     -- Captain Sensible, The Damned (from South Pacific's "Happy Talk")

____________________ HylaFAX(tm) Users Mailing List _______________________
  To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
 On UNIX: mail -s unsubscribe hylafax-users-request@hylafax.org < /dev/null
  *To learn about commercial HylaFAX(tm) support, mail sales@hylafax.org.*




Project hosted by iFAX Solutions