01-07-07 12:18 AM
Felix M. Palmen wrote:
> * JD <jd@something.com>:
>
> This is kind of a unix shell faq ;)
>
> Include two dashes (--) in your command line. after Them, nothing is
> interpreted as an option.
That's not entirely true.
/Some/ utilities recognize the double dash option (--) as an "end of
options" marker, but some do not.
In any case, it is always safe to use a qualified path that /does not/
start with a dash to access (i.e. delete, copy, etc) files who's names
start with a dash
Thus, instead of
rm -.txt
use
rm ./-.txt
or
rm /full/path/to/-.txt
This works in /all/ shell environments, with /all/ utilities, whether
they recognize the double dash option or not.
HTH
--
Lew
[ Post a follow-up to this message ]
|