We have a RHEL Linux server running two programs whose backups get copied over to another server running Ubuntu Linux. There is a "cleanup" script running in a cron job that is supposed to delete these backups that are more than ten days old but it is not working. In fact I can't get it to work even running it manually. Script is below-
#!/bin/bash
# bash shell script to cleanup jira backup files
# The script will remove files that are 10 days or older
#
# Remove jira backup files
for FILE in `find /usr/backup/jira -mtime +10`
do echo $FILE
/bin/rm -f $FILE 2>/dev/null
done
When I run this script at the command prompt- ./cleanup_jira.sh nothing happens; I just move down to the command prompt. I have root owning all the folders and files involved. This was all setup years ago to run by a different user, but apparently has not been working for quite awhile so I modified it all to be run as root. I do not get a mail message to root either when I try to run it.
Any ideas please respond.
Thanks for your time,
John Ellis