Subject: Re: rm patch
To: Bill Studenmund <firstname.lastname@example.org>
From: Thor Lancelot Simon <email@example.com>
Date: 08/23/2006 19:03:43
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
Bill is 100% right: -P should *never* unlink a file but leave the data
in place in the disk blocks.