The following reply was made to PR bin/167288; it has been noted by GNATS. From: Gary Palmer <gpal...@freebsd.org> To: Eugen Konkov <kes-...@yandex.ru> Cc: freebsd-gnats-sub...@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 > k...@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 _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"