Duplicate accounts?

Steve Ellis ellis at brouhaha.com
Tue Mar 1 00:54:09 UTC 2011


On 2/28/2011 3:23 PM, Larry Brower wrote:
>
> I would say this all depends on the application being invoked and would
> still say it is bad to just use * as opposed to say ./*
>
> I can't count the number of people Ive seen do things like rm -rf * in a
> directory and it recursively started working on / and /bin  etc...
Not to be a pest, but if you worry about '*' expanding to include 
dotfiles, then why do you think that './*' is safe?  Furthermore, '*' 
expansion is handled by the shell, not the application--in other words, 
dotglob rules the day.

The '*' there will just as well include dotfiles (i.e., it won't unless 
dotglob is set as another poster indicated).  I definitely agree that 
caution is warranted when using '*' in any command that can do horrible 
things to your files, especially for things like 'rm -rf', but don't 
travel under the misconception that './*' is going to save your 
bacon--because it won't.

-se


More information about the users mailing list