On Mon, 22 Jan 2001, Eric J. Schwertfeger wrote:

> On Mon, 22 Jan 2001, Garst R. Reese wrote:
> 
> > "Richard E. Hawkins" wrote:
> > > 
> > > Several months ago, in one of those tragic typing accidents, I
> > > inserted a space into "rm -r *~" on my laptop.  I ceased using it
> > Can't help you, but this is an obvious stupidity in rm.
> > rm -r [asterisk] ~ makes no sense. I think rm should be modified to
> > strip blanks after an *.
> 
> Under unix-like OS, the * is expanded by the shell, not by the rm command,
> so the rm command never sees the *.  You'd have to hack the shell, not the
> rm command, and the question becomes, how do you do that consistently?  Do
> you specialcase for a command rm with one of the arguments being * ?
> 
> 

You should alias rm to be 'rm -i'. This is possible on almost all shells.

Lior.

Reply via email to