bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#12339: Bug: rm -fr . doesn't dir depth first deletion yet it


From: Linda Walsh
Subject: bug#12339: Bug: rm -fr . doesn't dir depth first deletion yet it
Date: Fri, 07 Sep 2012 18:25:04 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.24) Gecko/20100228 Lightning/0.9 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666



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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]