DaZZa wrote:
> 
> On Thu, 4 Jul 2002, Simon Bryan wrote:
> 
> > Hi all,
> > Can anyone tell me why:
> >
> > rm DF21304_Family Statement - *
> >
> > matched all files starting with DF? It was either that one or:
> >
> > rm "DF21304_Family Statement - Alphabetical.c7report"
> >
> > and has left me in deep doggy doo doo??
> 
> rm accepts multiple arguments for the name of the file to delete.
> 
> Because you've got spaces in your filename, it'll have deleted everything
> which starts with
        ^^^^^^^^^^^
        matches exactly
> 
> DF21304_Family
> Statement
> 
> and worst of all
> 
> * (I.E. everything)

Suggestion: add the following to your .bashrc file:

alias rm='rm -i'

When you rm <something>, it will ask confirmation for each and
every file before deleting it.

And *only* if you are really really sure what you are doing:

rm -f <something>

Every working environment I have on Linux has the above alias,
for safety sake. The minor inconvenience is certainly worth it.


cheers
rickw

 




-- 
_________________________________
Rick Welykochy || Praxis Services

"There are no significant bugs in our released software that any
 significant number of users want fixed. "
     -- Bill Gates  (1995)
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to