Subject: Re: "rm *" files "-f" and "-r" - weird behaviour...
To: Ian Zagorskih <ianzag@megasignal.com>
From: None <kpneal@pobox.com>
List: tech-userlevel
Date: 01/24/2006 21:10:01
On Fri, Jan 20, 2006 at 01:25:05PM +0100, Hubert Feyrer wrote:
> On Fri, 20 Jan 2006, Ian Zagorskih wrote:
> >$ rm *
> >$ ls -lR
> >total 8
> >-rw-r--r--  1 ianzag  users  1 Jan 20 18:11 -f
> >-rw-r--r--  1 ianzag  users  1 Jan 20 18:11 -r
> >$
> 
> What does "echo *" instead of the rm say?

Oh, echo has saved my bacon on systems when I trashed the system in a
severe way. The echo command is a reasonable substitute for ls when ls 
is toast.

Oh, and having the shell expand wildcards can be confusing at times. 
The alternative is something like the Amiga where only a handful of
applications understand wildcards. And then only some of them did all
wildcards or did them all correctly.

-- 
Kevin P. Neal                                http://www.pobox.com/~kpn/
"14. Re-reading No. 13, I realize that it's quite possible I'm losing my
mind. I'm glad that for the most part I'm not aware it's happening."
  -- from "20 things I'm thankful for": Fortune, Nov 29, 2004, page 230