Re: [patch] rm can have undesired side-effects
- From: "Daniel O'Connor" <doconnor@xxxxxxxxxxxx>
- Date: Mon, 30 Oct 2006 12:30:02 +1030
On Monday 30 October 2006 10:06, Joerg Pernfuss wrote:
I guess that it can be fixed (in case it is not desired) by:
- Ignoring the -P option when the link count is greater then one, or
Silently ignoring user specified options is seldom a good way to go.
The user explicitly stated he wants to wipe the file contents.
I disagree that the user really meant to wipe the file if its link count is
1.
IMO having rm -P not wipe the file if its link count is >1 is a good idea.
if you are deleting a tree containing a file with links then this will result
in the file getting wiped in the end anyway because the link count will be 1
after the first link is removed.
Also, -f ONLY means to ignore permissions (or rather, try to ignore them).
It would be easy enough to add a diagnostic message in the -P case where the
link count is >1.
--
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
-- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
Attachment:
pgpNEBt2XZBrj.pgp
Description: PGP signature
- Follow-Ups:
- Re: [patch] rm can have undesired side-effects
- From: Joerg Pernfuss
- Re: [patch] rm can have undesired side-effects
- References:
- [patch] rm can have undesired side-effects
- From: Romain Tartiere
- Re: [patch] rm can have undesired side-effects
- From: Joerg Pernfuss
- [patch] rm can have undesired side-effects
- Prev by Date: Re: [patch] rm can have undesired side-effects
- Next by Date: Re: [patch] rm can have undesired side-effects
- Previous by thread: Re: [patch] rm can have undesired side-effects
- Next by thread: Re: [patch] rm can have undesired side-effects
- Index(es):