From owner-freebsd-current@FreeBSD.ORG Wed Nov 21 08:22:36 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B63B16A417 for ; Wed, 21 Nov 2007 08:22:36 +0000 (UTC) (envelope-from gepu@iogyte.ro) Received: from iogyte.ro (mail.iogyte.ro [62.231.111.163]) by mx1.freebsd.org (Postfix) with SMTP id 9E94213C44B for ; Wed, 21 Nov 2007 08:22:35 +0000 (UTC) (envelope-from gepu@iogyte.ro) Received: (qmail 67962 invoked by uid 1001); 21 Nov 2007 08:22:34 -0000 Date: Wed, 21 Nov 2007 10:22:34 +0200 From: Dan Epure To: Xin LI Message-ID: <20071121082233.GG19354@iogyte.ro> References: <47438516.6060105@delphij.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47438516.6060105@delphij.net> User-Agent: Mutt/1.5.16 (2007-06-09) Cc: freebsd-current@freebsd.org, kensmith@freebsd.org Subject: Re: Strange behavior of mv(1) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Dan Epure List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Nov 2007 08:22:36 -0000 Hi, >From the "man 1 mv": === cut here === ... mv [-f | -i | -n] [-v] source ... directory ... The destination path for each operand is the pathname produced by the concatenation of the last operand, a slash, and the final pathname component of the named file. ... === and here === so, i think both situations are all right. Gepu On Tue, Nov 20, 2007 at 05:08:38PM -0800, Xin LI wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, > > It seems that mv(1) behaves differently when handling with respect to > different filesystems. > > Test1: Moving within one filesystem: > > mkdir -p t/a/b > mkdir -p b/c/d > cd t/ > mv ../b a > > Resulting tree: > t/ > a/ > b/ > c/ > d/ > > However, with different filesystems: > > mkdir -p t/a/b > mkdir -p /tmp/b/c/d > cd t > mv /tmp/b a > > We get: > > t/ > a/ > b/ > b/ > c/ > d/ > > I think the second behavior is not correct? > > Cheers, > - -- > Xin LI http://www.delphij.net/ > FreeBSD - The Power to Serve! > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.7 (FreeBSD) > > iD8DBQFHQ4UWhcUczkLqiksRAs2xAJ9SJJu7fM/ujzr3QDnbBrz3bdbp1QCg1RC4 > 7sJ5E/KHURXw5GZ2dtlDI5k= > =Ftoi > -----END PGP SIGNATURE----- > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"