address@hidden wrote:
> The date bug of mv is still present in
> mv (coreutils) 5.2.1
> distributed with Fedore Core 3. When superuser moves a
> directory into a another directory, the date of the former
> directory changes to the current date.
The date of the directory is updated whenever there is a change in the
contents. One of the files in the directory is the ".." entry. The
".." entry points to the parent of the current directory. Moving a
directory will cause the previous ".." to be replaced with a new and
different ".." file. Therefore the timestamp is updated. This is not
a bug. This is correct behavior. Here is an example.
mkdir /tmp/adir1
mkdir /tmp/adir2
mkdir /tmp/adir1/anotherdir
ls -ldiog /tmp/adir1/anotherdir/..
1068004 drwxr-xr-x 3 80 2005-06-13 00:08 /tmp/adir1/anotherdir/..
mv /tmp/adir1/anotherdir /tmp/adir2/
ls -ldiog /tmp/adir2/anotherdir/..
1141039 drwxr-xr-x 3 80 2005-06-13 00:09 /tmp/adir2/anotherdir/..
Note the change in inode numbers. The ".." entry is updated to point
to the new parent directory.
Bob