Tag Archives: Shell Script

Shell Script – Delete Old Files

For housekeeping the backup files on a server, we can write a shell script to remove files which were created some days ago and scheduled it by cron job.

The following code is an example to remove backup files which were created 90 days ago. Please note that the target folder is just the same as the .sh file location and the .sh file is excluded in the command.
Continue reading Shell Script – Delete Old Files