Re: renaming or removing a file that start with minus

2007-03-04 Thread Ehud Karni
On Sun, 4 Mar 2007 15:43:54 ido wrote: > > How can I rename and/or delete a file that starts with minus ? > For example: > > mv --test test > > will end up with the error: > mv: unrecognized option `--test' > Try `mv --help' for more information. > > The same error will exists if I'll use the aster

Re: renaming or removing a file that start with minus

2007-03-04 Thread ik
Hello, Thank you all for the answers. The answer of didi worked for me well. The others did not (some of them I did try before the posting). Ido On 3/4/07, Yedidyah Bar-David <[EMAIL PROTECTED]> wrote: On Sun, Mar 04, 2007 at 03:43:54PM +0200, ik wrote: > Hello, > > How can I rename and/or del

Re: renaming or removing a file that start with minus

2007-03-04 Thread Yedidyah Bar-David
On Sun, Mar 04, 2007 at 03:43:54PM +0200, ik wrote: > Hello, > > How can I rename and/or delete a file that starts with minus ? > For example: > > mv --test test In addition to '--' already mentioned, you can mv ./--test test This will work with any mv, not only GNU's etc. that accept '--'. --

Re: renaming or removing a file that start with minus

2007-03-04 Thread shimi
From man mv: POSIX OPTIONS -- Terminate option list. -- Shimi On Sunday 04 March 2007 15:43, ik wrote: > Hello, > > How can I rename and/or delete a file that starts with minus ? > For example: > > mv --test test > > will end up with the error: > mv: unrecognized option `--test' > Tr

Re: renaming or removing a file that start with minus

2007-03-04 Thread Oren Held
a. Try to put AFTER all the regular "minus" options a double-dash ("--"), i.e. mv -v -- oldfile newfile this tells the command line parser that no options come after the double-dash. b. sometimes backslash, or tick, is enough, i.e. rm -v 'my*file' or rm -v my\*file - Oren ik wrote: Hello,

renaming or removing a file that start with minus

2007-03-04 Thread ik
Hello, How can I rename and/or delete a file that starts with minus ? For example: mv --test test will end up with the error: mv: unrecognized option `--test' Try `mv --help' for more information. The same error will exists if I'll use the asterisk wildcard instead. Please note that I'm lookin