0

In RedHat I have a script with the following line:

find /oracle/app/oracle/diag/tnslsnr/listener/alert  -name 'log_*' -mtime +5 -exec rm -f {} \;

It supposed to remove files 'log_*' which are older then 5 days, but it removes also files which are only 1 day old. I think the command is good, what else could I check that is doing this unexpected behaviour?

Inder
  • 3,711
  • 9
  • 27
  • 42
Jack
  • 19
  • 4
  • Are you sure it's this line that's deleting other files? I see no error in there and tested to be sure with findutils-4.5.11-5.el7.x86_64 – fancyPants Aug 09 '18 at 08:33
  • Maybe this is causing the deletion, but I don't see a problem at this statement either: find /oracle/app/oracle/diag/clients/user_oracle/host_67_80/alert 'log_*' -mtime +5 -exec rm -f {} \; – Jack Aug 09 '18 at 10:14
  • Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See [What topics can I ask about here](http://stackoverflow.com/help/on-topic) in the Help Center. Perhaps [Super User](http://superuser.com/) or [Unix & Linux Stack Exchange](http://unix.stackexchange.com/) would be a better place to ask. – jww Aug 10 '18 at 00:19

0 Answers0