Subject: Re: rm patch
To: None <>
From: Liam J. Foy <>
List: tech-userlevel
Date: 08/24/2006 11:48:13
On 24 Aug 2006, at 02:16, Christos Zoulas wrote:

> In article <>,
> Thor Lancelot Simon  <> wrote:
>> On Wed, Aug 23, 2006 at 10:57:23AM -0700, Bill Studenmund wrote:
>>> If I request -P, I don't want the file unlinked. There's  
>>> something in its
>>> data that I don't want to have linger on the disk afterwards.  
>>> Letting -f
>>> override this is unsafe; after the file is unlinked, there's no  
>>> way I can
>>> ensure the file contents get overritten.
>> In fact, I tend to think that, with -P, -f should cause rm to  
>> attempt to
>> chmod the file so that it can be overwritten, then overwrite it, then
>> unlink it if successful -- and, if any of this fails, immediately  
>> error
>> out.
> I think that this is too much magic. I would prefer that we error out
> giving the user a proper error message.
>> Bill i 100% right: -P should *never* unlink a file but leave the data
>> in place in the disk blocks.
> I totally agree.
> christos

I shall leave the patch as it is then. I'll commit it later tonight. Any
desired changes can be committed later on.

		Liam J. Foy