Link to home
Start Free TrialLog in
Avatar of sabecs
sabecs

asked on

Need output of changed files emailed via CRON.

Hi,
I need to get the results of below to run on a daily basis, perhaps into a log filer that can be emailed to me using CRON

for i in `ls /home/`; do find /home/$i/public_html/ -ctime -1 -o -mtime -1; done  

0 0 * * 0 mail -s "New or Updated Files - Server 1" andrew@mywebsite.com < /var/log/new_changed_file.log && cat /dev/null > /var/log/new_changed_file.log

Any ideas on the best way to achieve this?
ASKER CERTIFIED SOLUTION
Avatar of ozo
ozo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sabecs
sabecs

ASKER

Thanks ozo, that looks great, will give it a try.
Avatar of sabecs

ASKER

Thanks ozo, that is perfect..very much appreciated..