I would expect
find . -delete
to delete the current directory, but it doesn't. Why not?
The members of
The NEWS in findutils source code shows that they decided to keep the behavior:
Keep in mind that |
||||
|
Because your
So, it looks like |
|||||||||
|
The rmdir system call fails with EINVAL if the last component of its argument path is
|
|||
|
Calling You must delete the directory through its real name not its |
|||
|
find . -print
. – mbroshi 8 hours agocd ..; rm -r dir
with another shell with quite clear semantics... – Rmano 7 hours ago