[Asterisk-Dev] Question on using system(find args -exec rm {} \;)

bday at prosodiemail.com bday at prosodiemail.com
Fri Dec 30 08:44:38 MST 2005


All,
 
I am using Asterisk 1.0.7 and having a problem using system(find ... -exec
rm .. ) application as follows.
 
I'm trying to perform a system() application in my dialplan to remove all
files that are older than 2 days.  I get a n+101 error using the following
syntax (yes, there are files in this directory older than 2 days) and was
wondering if you see any obvious mistakes in my syntax?  
 
The command works ok on the Command Line, but not inside my dialplan.  I've
researched a number of resources and the only thing I can find is in the GNU
man pages for FIND where it mentions that I might need to escape the args
for the -exec, but I've tried all the escape combinations with no success!
The FIND works ok without the -exec so I have focused my troubleshooting to
the -exec portion.  Any suggestions?
 
;this finds  & removes all files in specified directory that are older than
2 days
 
exten => s,2,system(find ${PathRecordingTemp}/${CUSTNUM} -mtime +2
-maxdepth 1  -exec rm {} \;)  
 
Thanks

Bill DAY- SW Engineer 
--------------------------------------------- 
PROSODIE Interactive 
Phone: 954-671-6532
Fax: 954-343-5684
Corporate: 1-866-PROSODIE 
bday at prosodiemail.com <mailto:bday at prosodiemail.com>  
--------------------------------------------- 
www.prosodieinteractive.com <http://www.prosodieinteractive.com/>  

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20051230/832f9363/attachment.htm


More information about the asterisk-dev mailing list