Strange behavior of mv(1)

Xin LI delphij at delphij.net
Tue Nov 20 17:08:48 PST 2007


-----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 at 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-----


More information about the freebsd-current mailing list