Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Strange behavior of find and rm command

$
0
0
Hi

I run the below command to find and delete *.xml files 90 or more days old.

Code:

find . -type f -name '*.xml' -mtime +90 -exec rm {} \;
find: stat() error ./Hello/2014_EMPTY.xml: No such file or directory
./Hello/2014_EMPTY_8011.xml: No such file or directory
.....
....

If the file does not exists why is the my find even finding it and trying to delete something that does not exist?

Is it caching the find results causing this problem ?

I was not seeing this behaviour. Any guesses on how can i get my command working ?

I am on Unix Sparc.

Viewing all articles
Browse latest Browse all 16232

Trending Articles