Re: bug in mv (fileutils) 4.1

Kevin Layer <[email protected]>
Newsgroups gmane.comp.gnu.fileutils.bugs
Message-ID <[email protected]>
>    I have tried this:
>
> 	export POSIXLY_CORRECT=1
> 	mkdir mv_test
> 	cd mv_test
> 	mkdir a c
> 	ln -s a b
> 	mv -v b/ c
> 	alias mv
> 	which mv
>
> I expected, as is written, that the directory a will be moved into
> directory c (the symbolic link b to directory a will be dereferenced),
> but the link b has been moved. There is no alias for mv, mv resides in
> /bin.

I'm experiencing a different result:

crikey% ls -lR tmp/test_18
tmp/test_18:
total 4
drwxr-xr-x    2 layer    fi           4096 Nov 21 11:29 bar/
lrwxrwxrwx    1 layer    fi              3 Nov 21 11:29 foo -> bar/

tmp/test_18/bar:
total 4
-rw-r--r--    1 layer    fi             51 Nov 21 11:29 foo_18



crikey% mv tmp/test_18/foo/ tmp/test_18/baz



crikey% ls -lR tmp/test_18
tmp/test_18:
total 8
drwxr-xr-x    2 layer    fi           4096 Nov 21 11:29 bar/
drwxr-xr-x    2 layer    fi           4096 Nov 21 11:29 baz/

tmp/test_18/bar:
total 4
-rw-r--r--    1 layer    fi             51 Nov 21 11:29 foo_18

tmp/test_18/baz:
total 4
-rw-r--r--    1 layer    fi             51 Nov 21 11:29 foo_18



`bar' was copied to `baz', and the link was not moved, as Hans Ginzel
noticed.  For me, setting or not setting POSIXLY_CORRECT doesn't
matter.


crikey% mv --version
mv (fileutils) 4.1
Written by Mike Parker, David MacKenzie, and Jim Meyering.

Copyright (C) 2001 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
crikey% uname -a
Linux crikey 2.4.20-pre4 #5 Tue Aug 20 15:15:50 PDT 2002 i586 unknown
crikey% alias mv
crikey% which mv
/bin/mv
crikey% 


I'm using Red Hat 7.2, in case that matters.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.