bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mv fails to move all linked files


From: IIDA Yosiaki
Subject: mv fails to move all linked files
Date: 9 Mar 2004 11:50:27 +0900

It seems for me that mv in coreutils 5.1.3 on sparc-sun-solaris2.8
platform fails to move files in a certain condition.

* How to reproduce the bug.
# You need directories in two DIFFERENT FILESYSTEMS,
# say /tmp, /var/tmp.
srcfs=/tmp
dstfs=/var/tmp

src="${srcfs}/src"
dst="${dstfs}/dst"

mkdir "${src}" "${dst}"

echo FUBAR >"${src}/a"
ln "${src}/a" "${src}/b"
ln "${src}/a" "${src}/c"
ln "${src}/a" "${src}/d"

# The bug will be produced
# only if you move ALL linked files at ONCE.
# Neither
#  mv "${src}"/[abc] "${dst}"
# nor
#  mv "${src}"/[ab] "${dst}"
# produce any bugs at all.

mv "${src}"/[abcd] "${dst}"

* What I expected.

All a b c d in $dst are linked each other.

* What I got.

Only a b c are linked each other.
The file d exists with the same content,
but on different inode.

* Why it is wrong.

Also d must be linked to a, b and c.
--
  iida




reply via email to

[Prev in Thread] Current Thread [Next in Thread]