Matthew Burgess wrote:
> Well, I don't know what caused it but I got an error when trying to
> move /usr/bin/mv to /bin - it complained that there wasn't a
> /usr/bin/mv.

I have seen that once or twice myself.  At the time, I put it down to
either something with package users, or a race condition inside mv when
it's moving itself.  Now I'm thinking it isn't the package-user setup,
at least.

> Sure enough, `mv' was already in /bin.

That's what I saw as well -- it's almost like mv had already moved it
when it complained.

> I now appear to have two copies of `mv'!

OK... that's *not* what I saw.  ;-)

> One's in /bin and the other is in /usr/bin.  They both have the same
> timestamp, though aren't symlinks to each other.

Hardlinks perhaps?  (On your system are /usr/bin and /bin the same FS?
They are not on mine.)  I believe when mv is operating entirely inside
one FS, it will create a hardlink first, then unlink the old name.  If
it got interrupted somehow, that might explain why you have two copies.
See if the two filenames have the same inode number.

Actually, I believe when moving across filesystems, mv does a copy
first, then unlinks the original, and that may have been interrupted
too.  So if they're different FSes, you might want to just compare the
two files; if they're the same, then one was probably a copy of the
other before the other was unlinked.

Attachment: signature.asc
Description: OpenPGP digital signature

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to