From nobody@FreeBSD.org  Wed Apr 25 10:48:24 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 045D3106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 25 Apr 2012 10:48:24 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id E37E28FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 25 Apr 2012 10:48:23 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q3PAmN7q037663
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 25 Apr 2012 10:48:23 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q3PAmNna037662;
	Wed, 25 Apr 2012 10:48:23 GMT
	(envelope-from nobody)
Message-Id: <201204251048.q3PAmNna037662@red.freebsd.org>
Date: Wed, 25 Apr 2012 10:48:23 GMT
From: Eugen Konkov <kes-kes@yandex.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: mv can not copy files with '-' sign as first simbol
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         167288
>Category:       bin
>Synopsis:       mv(1): mv can not copy files with '-' sign as first simbol
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 25 10:50:09 UTC 2012
>Closed-Date:    Wed Apr 25 20:56:54 UTC 2012
>Last-Modified:  Wed Apr 25 20:56:54 UTC 2012
>Originator:     Eugen Konkov
>Release:        10.0-CURRENT
>Organization:
ISP FreeLine
>Environment:
uname -a
FreeBSD fastvpn.in.freeline.in.ua 10.0-CURRENT FreeBSD 10.0-CURRENT #2: Fri Dec 16 18:38:54 EET 2011     kes@fastvpn.in.freeline.in.ua:/usr/obj/usr/src/sys/KES_KERN_v9  i386

>Description:
If I use glob symbol, then special symbols in file names must not be counted as special symbols
>How-To-Repeat:
: > -1.wav
mv * /some/dir
mv: illegal option -- 1
usage: mv [-f | -i | -n] [-v] source target
       mv [-f | -i | -n] [-v] source ... directory


>Fix:


>Release-Note:
>Audit-Trail:

From: Gary Palmer <gpalmer@freebsd.org>
To: Eugen Konkov <kes-kes@yandex.ru>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: bin/167288: mv can not copy files with '-' sign as first simbol
Date: Wed, 25 Apr 2012 14:25:45 -0400

 On Wed, Apr 25, 2012 at 10:48:23AM +0000, Eugen Konkov wrote:
 > 
 > >Number:         167288
 > >Category:       bin
 > >Synopsis:       mv can not copy files with '-' sign as first simbol
 > >Confidential:   no
 > >Severity:       non-critical
 > >Priority:       low
 > >Responsible:    freebsd-bugs
 > >State:          open
 > >Quarter:        
 > >Keywords:       
 > >Date-Required:
 > >Class:          sw-bug
 > >Submitter-Id:   current-users
 > >Arrival-Date:   Wed Apr 25 10:50:09 UTC 2012
 > >Closed-Date:
 > >Last-Modified:
 > >Originator:     Eugen Konkov
 > >Release:        10.0-CURRENT
 > >Organization:
 > ISP FreeLine
 > >Environment:
 > uname -a
 > FreeBSD fastvpn.in.freeline.in.ua 10.0-CURRENT FreeBSD 10.0-CURRENT #2: Fri Dec 16 18:38:54 EET 2011     kes@fastvpn.in.freeline.in.ua:/usr/obj/usr/src/sys/KES_KERN_v9  i386
 > 
 > >Description:
 > If I use glob symbol, then special symbols in file names must not be counted as special symbols
 > >How-To-Repeat:
 > : > -1.wav
 > mv * /some/dir
 > mv: illegal option -- 1
 > usage: mv [-f | -i | -n] [-v] source target
 >        mv [-f | -i | -n] [-v] source ... directory
 
 
 Standard command line protocol says that you should use -- to 
 mark the end of command line options in this situation, so that any
 -<something> that comes after is not processed as an option
 
 e.g.
 
 mv -- * /some/dir
 
 Since the glob is done in the shell prior to being passed to mv as 
 arguments, there is no way for 'mv' to know any differently.
 
 Gary
State-Changed-From-To: open->closed 
State-Changed-By: avg 
State-Changed-When: Wed Apr 25 20:56:35 UTC 2012 
State-Changed-Why:  
Pilot error. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=167288 
>Unformatted:
