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 is docu


From: Linda Walsh
Subject: bug#12339: Bug: rm -fr . doesn't dir depth first deletion yet it is documented to do so.
Date: Sun, 02 Sep 2012 17:32:17 -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

I'm not sure what the rational for putting in special check to
try to remove the current directory *before*, it's children is,
but it's not correct behavior.

It used to be it just 'ignored' an attempt to delete the current dir
and deleted all the files under it.
Now there seems to be a special check for "." and disallow it as a
rm target.  But that was a safe and portable way to delete all contents.

can't use '*', -- it is expanded differently depending on shell and settings!

I always felt a bit safer if I was able to cd into the dir I wanted, then
rm -fr from the root of that dir by specifying '.'

Could that be added back in as a safe and portable way to do rm *, where I
don't have to worry about whether or not it applies the * will pick up
hidden files.

I would expect it to delete all but the current inode I'm parked on, and
for it -- either issue an error or silently ignore ... preferring 'DoWIMean'
versus 'technically'...as being more user friendly.

Sides -- it normally does depth-first traversal --- since you can't delete
a dir with contents still in it -- so why different for '.'?







reply via email to

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