SOLVED Delete Voicemails older than X number of days

Status
Not open for further replies.

roger_roger

Member
Oct 12, 2016
198
19
18
70
This is more of a Linux scripting question, which is not my forte...

Voicemails are stored in the following directory:

/var/lib/freeswitch/recordings/<domain_url>/archive/<year>/<month>/<day>

How can I create either a find command (or some other mechanism) that will find the year,month,day folder that is X days older than today?
 

yukon

Member
Oct 3, 2016
138
14
18
You can use something like this:
Code:
find /var/lib/freeswitch/recordings/*/archive/*/*/* -type f -name "*.wav" -mtime +15 -exec rm {} \;
 
Status
Not open for further replies.