Here is another way to delete old files, this time using a script. The script will delete files older than the most recent KEEP files.
Example: If you set KEEP = 12, the 12 most recent files will be kept and everything older deleted.
How to use:
1. Click \’read more\’ to view the script, copy and paste it into a file named \’deleteOldFiles.sh\’
2. make the file executable with \’chmod 755 deleteOldFiles.sh\’
3. change the constants KEEP, DIRLOC and FILEEXT to suit your needs
4. run the script by typing ./deleteOldFiles.sh