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

rm -rf ab returns find: `./ab': No such file or directory

$
0
0
Hi Gurus.

This is driving me a bit batty. I now if must be a simple matter but I cant find anything that references it.

I have a housekeeping script that searches for some huge dump directories then removes them using rm -rf.

Code:

find ./ -name 'ab' -exec rm -rf {} \;
This works but always returns the following

find: `./ab': No such file or directory

This would be ok on an "on the fly" delete, but I have this as part of a larger backup script and this message returns as something for us to error check.

Is there a way for me to delete a directory without getting this message returned?

Thanks!

Viewing all articles
Browse latest Browse all 16232

Trending Articles