Vicidial Recordings delete error bash: /bin/rm: Argument list too long

/bin/rm Argument list too long

Topic: Vicidial Recordings delete error bash: /bin/rm: Argument list too long 


  Overview:

While deleting the recording files in vicidial using rm command you might receive the this error "-bash: /bin/rm: Argument list too long"


/bin/rm argument list too long

error: -bash: /bin/rm: Argument list too long

  Solution:

    you can't use the rm command to delete huge files in one shot ,
use the below commands to delete bulk recordings from the respective folder

Deleting MP3 files
cd /var/spool/asterisk/monitorDONE/MP3
find . -type f -name "*.mp3" | xargs -l500 rm -rf
Deleting GSM files
cd /var/spool/asterisk/monitorDONE/GSM
find . -type f -name "*.gsm" | xargs -l500 rm -rf
Deleting the wav files located in ORIG folder
cd /var/spool/asterisk/monitorDONE/ORIG
find . -type f -name "*.wav" | xargs -l500 rm -rf

If you are using plain asterisk or Freepbx  solution then your recordings will be located in below location

cd /var/spool/asterisk/monitor/
find . -type f -name "*.wav" | xargs -l500 rm -rf