new expected behavior? src/bin/rm/rm.c
Matthew Dillon
dillon at apollo.backplane.com
Thu Jun 2 21:02:03 PDT 2005
Well, the program itself is only doing what it has been told to do,
aka the -I option was specified in the alias for rm. On the otherhand
I made that alias the default for new installations. /etc/csh.cshrc
will have:
if ( $?prompt ) then
alias rm 'rm -I'
endif
The question is whether -I should override -f, whether we should require
two -f's to override -I (since -I is supposed to be a safety feature),
whether the default csh.cshrc should contain the alias, and/or whether
the 'rm' program should be smart and detect background operation
(which is easy to test) and disable -I if so.
I am kinda leaning towards detecting background operation and disabling
-I in that case, plus also requiring two -f's to override a prior -I.
What do people think?
-Matt
Matthew Dillon
<dillon at xxxxxxxxxxxxx>
:Per the "dumb user fix" in rm...
:
:http://www.dragonflybsd.org/cvsweb/src/bin/rm/rm.c?f=u&only_with_tag=&logsort=date
:
:Is this expected behavior? ie I said fork a rm -rf, I really mean it...
:but I had to ^Z, fg, bg...
:
:roxy# rm -rf /usr/home/geo &
:[1] 11174
:roxy# recursively remove /usr/home/geo? y
:y: Command not found.
:[1] + Suspended (tty input) rm -I -rf /usr/home/geo
:roxy# fg
:rm -I -rf /usr/home/geo
:^Z
:Suspended
:roxy# bg
:[1] rm -I -rf /usr/home/geo &
:[1] + Suspended (tty input) rm -I -rf /usr/home/geo
:roxy#
:
:actually I'm not completely sure what was going on with the fd there.
:
:shouldn't -f override -I as well as -i? If we are using -I, we can use
:-f, or not, right?
:
:// George
:--
:George Georgalis, systems architect, administrator Linux BSD IXOYE
More information about the Bugs
mailing list