FANDOM


(Created page with "This is for cleaning up old call recordings after X period of time, so your old PC with low storage availability doesn't get full of them. Add this as a [http://www.cyberciti.bi...")
 
 
Line 1: Line 1:
 
This is for cleaning up old call recordings after X period of time, so your old PC with low storage availability doesn't get full of them.
 
This is for cleaning up old call recordings after X period of time, so your old PC with low storage availability doesn't get full of them.
   
Add this as a [http://www.cyberciti.biz/faq/how-do-i-add-jobs-to-cron-under-linux-or-unix-oses/ cron job]
+
Add this as a [https://www.cyberciti.biz/faq/how-do-i-add-jobs-to-cron-under-linux-or-unix-oses/ cron job]
   
 
Auto-delete after 90 days (change the 90, to your specific needs)
 
Auto-delete after 90 days (change the 90, to your specific needs)

Latest revision as of 11:17, December 1, 2017

This is for cleaning up old call recordings after X period of time, so your old PC with low storage availability doesn't get full of them.

Add this as a cron job

Auto-delete after 90 days (change the 90, to your specific needs)

/usr/bin/find /var/spool/asterisk/monitor/*.wav -mtime 90 -delete


for a percentage based solution:

while (( `df /|/usr/bin/tail -1|/usr/bin/awk '{print $5'}|/bin/sed 's/\%//'` >= 76 ));do  /bin/rm -f `/bin/ls -tr /var/spool/asterisk/monitor/*.wav| /usr/bin/head -n 1` ;done


Extracted from Forums

Community content is available under CC-BY-SA unless otherwise noted.