Blog

Sometimes I need to find and delete, move or somehow alternate old files. Usually to delete old backups or session files. Here is very simple way to find and delete in a single command:

find /mnt/datadisk/Backups/PBX -mtime +5 -exec rm {} \;

This will delete the files older than 5 days.