GNU bug report logs - #21051
direct/file deletion

Previous Next

Package: coreutils;

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


View this message in rfc822 format

From: Ruediger Meier <sweet_f_a <at> gmx.de>
To: 21051 <at> debbugs.gnu.org
Cc: bob <at> proulx.com, lsung <at> juniper.net
Subject: bug#21051: direct/file deletion
Date: Thu, 16 Jul 2015 15:20:57 +0200
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.