new expected behavior? src/bin/rm/rm.c

Matthew Dillon dillon at
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'

    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?

					Matthew Dillon 
					<dillon at xxxxxxxxxxxxx>

:Per the "dumb user fix" in rm...
: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
:roxy# bg
:[1]    rm -I -rf /usr/home/geo &
:[1]  + Suspended (tty input)         rm -I -rf /usr/home/geo
: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