Subject: bug#17372: GNU mv

From: Pádraig Brady <[email-masked]>
Date: Tue, 29 Apr 2014 16:06:45 +0100

tag 17372 notabug
close 17232
stop

On 04/29/2014 03:34 PM, Scott Brunner wrote:
> Hi Folks,
> 
> Not sure I'm in the right place - but - I'm having a problem with the "mv" command in Cygwin's Unix emmulator... The man page directed me to this address... I have a bunch of files that all start with the "-" character (-moo, -moo1, -moo2)... Obviously the "-" is treated as a switch in the Unix world - so you can't do simple moves as you would in Solaris... I'm not sure if the goal of your GNU release is supposed to match the functionality of Unix but I just wanted to point this out in case you were unaware...
> 
> In Solaris - this works: 
>  
>     mv -f - '-moo' SCO-moo
> 
> In Cygwin - it does not...

two -- are need to terminate option processing in GNU land

  mv -f -- '-moo' SCO-moo

See also:

  http://www.gnu.org/software/coreutils/faq/coreutils-faq.html#I-have-a-file-_0027_002df_0027-and-it-affects-rm_002e

thanks,
Pádraig.