Subject: Re: Larger rm Change
To: None <>
From: None <>
List: tech-userlevel
Date: 01/09/2003 11:42:51
At Thu, 9 Jan 2003 11:32:54 +0000 (UTC), "Lucio De Re" wrote:
> This is a hard one.  I would prefer (not ever having used the
> immutable flag(s)) if rm -rf * (for root, at least) continued to
> behave as expected, that is, remove all files irrespective of
> settings.

there are, of course, exceptions to this: rm -rf won't remove stuff
on, say, a read-only file system.  So, if your '*' includes things
that traverse a ro fs's mount point...

users usually don't set the special flags.  if they do, i believe one
quite reasonable intent is "look extra close at this before blowing it
away/changing it/etc."

I don't think that normal 'rm -rf' (even for root) should remove users
immutable settings, therefore, and more than (to consider the mount
point example) they should make the simple attempt to change the mount
point to read-write.  8-)

like others have said, if it's an issue of automation like /tmp
clearing, either an extra flag should be added to do it, or chflags
should be run first.