Re: confusing behaviour of the * wildcard when handling "dot" files and dirs.
- From: Rahul <nospam@xxxxxxxxxxxxxx>
- Date: Wed, 30 Jul 2008 16:06:37 +0000 (UTC)
Robert Heller <heller@xxxxxxxxxxxx> wrote in
news:BJadnd3nBf78IhLVnZ2dnUVZ_uqdnZ2d@xxxxxxxxxxxxxxx:
If you do just .* or .?* you will capture in the first instance both
. and .. as well and if you do .?* you will capture .. This is pretty
dangerous if you are doing
rpm -r .*
for example.
Remember to always do
.??* as the wildcard for . files.
Thanks for those tips guys! The damage wasn't too bad this time around but
it'll teach me to be more cautious as root the next time!
--
Rahul
.
- References:
- Prev by Date: Re: simple script
- Next by Date: path keeps bloating with repeated entries on invoking subshells
- Previous by thread: Re: confusing behaviour of the * wildcard when handling "dot" files and dirs.
- Next by thread: Re: confusing behaviour of the * wildcard when handling "dot" files and dirs.
- Index(es):