GNU bug report logs -
#21051
direct/file deletion
Previous Next
Reported by: Lee Sung <lsung <at> juniper.net>
Date: Mon, 13 Jul 2015 21:44:02 UTC
Severity: normal
Tags: notabug
Done: Assaf Gordon <assafgordon <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #20 received at submit <at> debbugs.gnu.org (full text, mbox):
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
This bug report was last modified 6 years and 218 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.