rm: option -I and --interactive=once are not behaving equivalently
From:
Judit Foglszinger
Subject:
rm: option -I and --interactive=once are not behaving equivalently
Date:
Wed, 10 Dec 2008 01:02:30 +0100
User-agent:
KMail/1.9.9
Hi,
Regarding to the manpage and comments in rm.c,
the option -I of rm is meant to be the same as --interactive=once
It isn't, since when removing a write-protected file,
rm prompts if --interactive=once is given,
but it doesn't prompt, if -I is given.
This behaviour of rm -I is surprising,
since rm even prompts before removing a write-protected file,
if no extra interactivity is asked for.
It can be changed easily by changing line 268 of rm.c
from
x.interactive = RMI_NEVER;
to
x.interactive = RMI_SOMETIMES;
(see attached diff)