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


View this message in rfc822 format

From: Linda Walsh <coreutils <at> tlinx.org>
To: Eric Blake <eblake <at> redhat.com>
Cc: Alan Curry <pacman-cu <at> kosh.dhis.org>, 12339 <at> debbugs.gnu.org
Subject: bug#12339: Bug: rm -fr . doesn't dir depth first deletion yet it
Date: Fri, 07 Sep 2012 18:25:04 -0700

Eric Blake wrote:
> On 09/07/2012 06:02 PM, Linda Walsh wrote:
> 
>> The thing is, by doing rm -rf on ., I am not trying to remove . or ..
>> I'm trying to remove the files in it.
>>
>> Other wise there is no way to specify, using "rm" to delete the contents
>> of a directory  but not the directory itself.
> 
> Yes there is, and Paul already told it to you:
> 
> rm -rf * .[!.] .??*
----

You must have missed that rm doesn't expand shell globs... and I don't
want to get the shell involved for rm'ing files anymore than cp needs
to to copy directories or the files in a dir and not the dir.




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

Previous Next


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