I have redhat ES 4 installed on PC.

Can someone tell me what is the problem with this script.. I had it working on Mandrake 8.1 but doesn't work with redhat ES4.


find /home/ftp/incoming/mydir -exec touch {} \;

echo "Files to be removed $(date +%m%d%y)-----------------------------------">>/home/ftp/clean.log
find /home/ftp/incoming/ -ctime +4 -exec ls -lh >>/home/ftp/clean.log {} \;
find /home/ftp/incoming/ -ctime +4 -exec rm -rf {} \;

Will remove files older then 4 days except the mydir.