GNU bug report logs - #12339
Bug: rm -fr . doesn't dir depth first deletion yet it is documented to do so.

Previous Next

Package: coreutils;

Reported by: Linda Walsh <coreutils <at> tlinx.org>

Date: Mon, 3 Sep 2012 00:34:02 UTC

Severity: normal

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #47 received at 12339 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: "12339 <at> debbugs.gnu.org" <12339 <at> debbugs.gnu.org>
Cc: Linda Walsh <coreutils <at> tlinx.org>
Subject: Re: bug#12339: Bug: rm -fr . doesn't dir depth first deletion yet
	it is	documented to do so.
Date: Mon, 03 Sep 2012 13:04:31 -0700
I was about to suggest the following, on GNU/Linux:

  # Don't do this unless you know what you're doing!
  rm -fr /proc/self/cwd/

Except it doesn't work!  Not even if I append '.':

  $ mkdir /tmp/victim
  $ cd /tmp/victim
  $ touch foo
  $ rm -fr /proc/self/cwd/
  rm: cannot remove `/proc/self/cwd': Too many levels of symbolic links
  $ rm -fr /proc/self/cwd/.
  rm: cannot remove directory: `/proc/self/cwd/.'
  $ ls
  foo

Aren't these bugs, at least?




This bug report was last modified 6 years and 187 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.