What I was saying was that &quot;rm -rf .&quot; just won&#x27;t work. You cannot delete the directory you are in directly (&quot;.&quot; and &quot;..&quot; are not valid options).<p>If however you delete a directory that is higher up the directory tree (e.g. the parent directory), it will be deleted.<p>As far as I can tell this does not violate the POSIX standard[1], as that situation is left as undefined (since in theory the directory you are deleting will chain to the directory you are currently in which is open in the tty).<p>Edit: The rest of my previous comment was trying to say that the utility of being able to self destruct the current directory is arguable. Why should it be prevented (especially when it could just be hidden behind a flag to prevent accidental destruction)?<p>Edit2: D&#x27;oh. Forgot the reference:<p>[1] <a href="http:&#x2F;&#x2F;pubs.opengroup.org&#x2F;onlinepubs&#x2F;9699919799&#x2F;functions&#x2F;rmdir.html" rel="nofollow">http:&#x2F;&#x2F;pubs.opengroup.org&#x2F;onlinepubs&#x2F;9699919799&#x2F;functions&#x2F;rm...</a>