[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Tripwire Report Purge



I have put this in crontab to purge my old tripwire reports. 

# check for tripwire reports files and delete old ones
0 3 * * * root find  /var/lib/tripwire/report -daystart -type f -mtime -90
-mtime +29 | xargs -r rm


I have a global alias set for rm = "rm -i" which works if I do a rm filename.
Set in /etc/profile. 

However, if I run find  /var/lib/tripwire/report -daystart -type f -mtime -90
-mtime +29 | xargs -r rm from a terminal, no interactive prompt occurs.

I have read the xargs man, but did not see anything about xargs overriding
global aliases. 

It nice that it does not prompt since it is being run out of crontab. Yet, I
was surprised not to see a delete prompt when testing. 

Is this correct?

Thanks, Mike.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]