filenames starting with a '-'

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: sinck@ugive.com
Date:  
Subject: filenames starting with a '-'

\_ wrote:
\_ >
\_ > \_ There's a couple different ways to do it:
\_ > \_
\_ > \_ 1) cp -- -001 /wherever
\_ > \_ or
\_ > \_ 2) cp ./-001 /whereever
\_ >
\_ > 3) cp ?001 /wherever
\_ > 4) cp *01 /wherever
\_ >
\_ > shell expansions/wildcards are your friends.
\_ >
\_ > \_ The same format should work with rm and mv too.
\_ >
\_ > YMMV on different unices passing a --
\_
\_ Shell expansions result in the error:

Doh. Yeah. My bad. YMMV when you've been hacking too long and think
it's a good time to answer mail.

On the bright side, at least there were no suggestions of trying to
use rm on the ever popular "-rf *" file.

David