From owner-freebsd-bugs@FreeBSD.ORG Wed Apr 25 18:30:15 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36024106566B for ; Wed, 25 Apr 2012 18:30:15 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 210F48FC0C for ; Wed, 25 Apr 2012 18:30:15 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q3PIUEaJ005711 for ; Wed, 25 Apr 2012 18:30:14 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q3PIUED5005708; Wed, 25 Apr 2012 18:30:14 GMT (envelope-from gnats) Date: Wed, 25 Apr 2012 18:30:14 GMT Message-Id: <201204251830.q3PIUED5005708@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Gary Palmer Cc: Subject: Re: bin/167288: mv can not copy files with '-' sign as first simbol X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Gary Palmer List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2012 18:30:15 -0000 The following reply was made to PR bin/167288; it has been noted by GNATS. From: Gary Palmer To: Eugen Konkov 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 - 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