On Wednesday 15 July 2015, Lee Sung wrote:
> > How would I delete directory "." and ".."
>
> Those entries are required infrastructure and should not be deleted.
> The "." directory refers to the current directory.  The ".." refers
> to the parent directory.  The ".." entry on some classic Unix file
> systems may be unlinked but I don't believe that any current Linux
> file system allows this.  This is a restriction imposed by the kernel
> and not by coreutils.

I understand why "." and ".." links can't or at least should not be 
removed. And maybe it would be also inconsistent behavior to follow 
these links and to remove the original target directory.

But I don't understand why "rm -rf ." does not delete at least all 
content within ".".

My use case would be to cleanup "build" directories to start freshly 
like this:

$ pwd
/home/rudi/devel/coreutils/=build-1234
$ rm -rf .
$ ../configure

IMO all workarounds to cleanup "." (inclusive dot-files) are just 
annoying.

cu,
Rudi







Reply via email to