bug-coreutils
[Top][All Lists]
Advanced

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

Does mv Preserve Hard Links?


From: ralph
Subject: Does mv Preserve Hard Links?
Date: Wed, 22 Jun 2005 10:15:57 -0400 (EDT)
User-agent: SquirrelMail/1.4.4

Hi,

Does `mv (coreutils) 5.2.1' preserve hard links?  In particular

    mv /mnt/fs1/dir /mnt/fs2/dir

where /mnt/fs[12] are two different ext3 filesystems, /mnt/fs2/dir
doesn't exist, and /mnt/fs1/dir contains many thousands of files,
several thousand of which are reference by 3 to 6 directory entries
compared to the normal 1.

A small test run suggests it does, but doing the above in practice left
me with each originally hard-linked file consuming multiple inodes, each
with a link count of 1.

I've got lots more moving to do so I'd like to determine if there are
conditions under which mv doesn't preserve hard links, e.g. large number
of files, before deciding to use it again.  Similarly, if the
knowledgeable folks here know it always does preserve hard links under
these conditions then I'll investigate the behaviour I'm seeing further.

Cheers,


Ralph.






reply via email to

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