A while ago, I reported that this version of mv was moving a file within a
filesystem by copying and then deleting the original.
I have now reproduced the problem, and have run strace to detect what it's doing.
I think the circumstances of this problem may have existed last time too.
Here's what strace shows; it seem clear to me and so I don't need to include it
all;-)
011 brk(0x8056000) = 0x8056000
15011 rename("/var/downloads/gcc-2.95.1-25.src.rpm",
"/var/downloads/linux.s390.org/pub/RedHat/SRPMS/gcc-2.95.1-25.src.rpm") = -1 EPERM
(Operation not permitted)
15011 unlink("/var/downloads/linux.s390.org/pub/RedHat/SRPMS/gcc-2.95.1-25.src.rpm")
= 0
15011 open("/var/downloads/gcc-2.95.1-25.src.rpm", O_RDONLY|O_LARGEFILE) = 4
15011 open("/var/downloads/linux.s390.org/pub/RedHat/SRPMS/gcc-2.95.1-25.src.rpm",
O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0600) = 5
15011 SYS_197(0x5, 0xbffff668, 0x4010ed40, 0x2, 0x5) = 0
15011 SYS_197(0x4, 0xbffff668, 0x4010ed40, 0x2, 0x4) = 0
I suggest that mv be changed to tell the user that the rename failed and then get on
with the copy.
Consider, too, prompting the user if the file's big (unless --force is in effect).
It would also be prudent to check that there's enough space in the destination to
hold the file(s).
--
Cheers
John Summerfield
http://www2.ami.com.au/ for OS/2 & linux information.
Configuration, networking, combined IBM ftpsites index.
Microsoft's most solid OS: http://www.geocities.com/rcwoolley/
Note: mail delivered to me is deemed to be intended for me, for my disposition.
_______________________________________________
Bug-fileutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-fileutils