Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Apr 2012 18:30:14 GMT
From:      Gary Palmer <gpalmer@freebsd.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/167288: mv can not copy files with '-' sign as first simbol
Message-ID:  <201204251830.q3PIUED5005708@freefall.freebsd.org>

index | next in thread | raw e-mail

The following reply was made to PR bin/167288; it has been noted by GNATS.

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


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204251830.q3PIUED5005708>