Article 5QK6G find, unexpected message

find, unexpected message

by
kaz2100
from LinuxQuestions.org on (#5QK6G)
Hya

I cannot figure out why I am getting this error. dir2del is deleted, as I intend.Code:>mkdir dir2del
>find . -type d -name dir2del -print
./dir2del
>find . -type d -name dir2del -exec rm {} \;
rm: cannot remove './dir2del': Is a directory
>find . -type d -name dir2del -exec rm -r {} \;
find: ./dir2del': No such file or directoryI do not think I should get "No such...". I understand that -exec clause is interpreted as "rm -r dir2del", thus "rm dir2del" results in error.

rm is aliased to "rm -i", but I think it is irrelevant. This also happens when dir2del contains file/dir.

So far, I am unable to locate reason(s) in "man rm", "info rm"...

Does any expert know why?latest?d=yIl2AUoC8zA latest?i=OS2PbBD4y8M:DyC8ejhGBxU:F7zBnMy latest?i=OS2PbBD4y8M:DyC8ejhGBxU:V_sGLiP latest?d=qj6IDK7rITs latest?i=OS2PbBD4y8M:DyC8ejhGBxU:gIN9vFwOS2PbBD4y8M
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments