Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Nov 2007 10:22:34 +0200
From:      Dan Epure <gepu@iogyte.ro>
To:        Xin LI <delphij@delphij.net>
Cc:        freebsd-current@freebsd.org, kensmith@freebsd.org
Subject:   Re: Strange behavior of mv(1)
Message-ID:  <20071121082233.GG19354@iogyte.ro>
In-Reply-To: <47438516.6060105@delphij.net>
References:  <47438516.6060105@delphij.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <delphij@delphij.net>	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"



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