I wrote: >> Zygo Blaxell recently wrote: >> [...] >>> There's two cases of note: one where the source is a directory (so >>> mv copies the directory and attempts to remove the original), and one >>> where the source is a file but the file is in an unwritable directory >>> (so mv copies this file as in the directory case). The latter case is >>> especially annoying since the removal of the original file always fails, >>> leaving me with two copies to clean up. The latter case occurs quite > > I cannot reproduce that. > Here's what I tried, as a non-root user, using mv from coreutils-5.93: > > $ mv /tmp/.X0-lock /var/tmp/j > mv: cannot move `/tmp/.X0-lock' to `/var/tmp/j': Operation not permitted > [Exit 1] > $ ls -l /tmp/.X0-lock /var/tmp/j > ls: /var/tmp/j: No such file or directory > -r--r--r-- 2 root root 11 Dec 19 04:13 /tmp/.X0-lock > [Exit 2] > > If you can reproduce it, please be sure to let > us know the types of file systems and (OS) involved. > Also, please run mv under strace and include its output.
Actually, I *can* reproduce it, of course. The above system didn't have separate partitions for /tmp and /var. If they're separate, you do end up with a copy in both source and destination. One could make an argument for removing the destination in this case, but I think that would be a little too surprising. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

