GNU bug report logs - #15328
Bug or dubious feature?

Previous Next

Package: coreutils;

Reported by: Linda Walsh <coreutils <at> tlinx.org>

Date: Tue, 10 Sep 2013 20:50:02 UTC

Severity: normal

Tags: notabug

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Linda Walsh <coreutils <at> tlinx.org>
To: 15328 <at> debbugs.gnu.org
Subject: bug#15328: Bug or dubious feature?
Date: Tue, 10 Sep 2013 13:48:37 -0700
I was trying to move a directory with the 'mv' command.

Instead of renaming the files it copied and deleted them.

The source and destination were the same disk which a stat of the source
and destination would confirm.

The "oddity", is that I was moving between
/usr/share/fonts -> /home/law/fonts where I use "rbind" to mount
part of home in /usr/share:


(fstab)
/home/share /usr/share  none  rbind

stat shows:


> stat -c %D /usr/share /home/share
fe03
fe03


So... why didn't it rename if the device numbers are the same?

I'm sure it wouldn't try a rename if I moved from /usr->/usr/share as
share is a different partition/device number, so it seems 'mv' does check
device id's to verify sameness upon move.  Then why not in moving
what was "effectively", /home/share/fonts/<dirname> => /home/law/fonts/. ?

It was only 12G of files, so it was done in ~ 5-10 minutes, but I was
expecting a few seconds...??

Coreutils 8.21/linux 3.9.11 / xfs filesystem.





This bug report was last modified 6 years and 118 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.