Hi.
I am doing this:
{
....other commands
find / -ctime +5 -name \*.gz -exec ls -l {} \;
find / -ctime +5 -name \*.gz -exec rm -e {} \;
....other commands
} | tee log 2>&1
cat log | mail me
How do I capture the output from "rm -e" into the same log file as all the other commands? I have tried doing
find / -ctime +5 -name \*.gz -exec rm -e {} \; 2>log
and
find / -ctime +5 -name \*.gz -print | xargs rm -e 2> log
without any luck so far.
Thanks!
-John
I am doing this:
{
....other commands
find / -ctime +5 -name \*.gz -exec ls -l {} \;
find / -ctime +5 -name \*.gz -exec rm -e {} \;
....other commands
} | tee log 2>&1
cat log | mail me
How do I capture the output from "rm -e" into the same log file as all the other commands? I have tried doing
find / -ctime +5 -name \*.gz -exec rm -e {} \; 2>log
and
find / -ctime +5 -name \*.gz -print | xargs rm -e 2> log
without any luck so far.
Thanks!
-John