[BusyBox] mv is deleting files!
Rainer Weikusat
rainer.weikusat at sncag.com
Thu Jul 14 08:47:36 UTC 2005
Steven Scholz <steven.scholz at imc-berlin.de> writes:
> Hi there,
>
> I just noticed something strange with busybux-1.00 mv command:
>
> ~ # ls -l /opt/imc/idxcan
> ls: /opt/imc/idxcan: No such file or directory
>
> [Ok. cause the file is not there yet.]
>
> ~ # ls -l /tmp/idxcan
> -rw-r--r-- 1 root root 1154716 Jan 1 00:43 /tmp/idxcan
>
> [This file will be moved to /opt/imc]
>
> ~ # mv /tmp/idxcan /opt/imc/
> ~ # ls -l /tmp/idxcan
> ls: /tmp/idxcan: No such file or directory
> ~ # ls -l /opt/imc/idxcan
> -rw-r--r-- 1 root root 1154716 Jan 1 00:43 /opt/imc/idxcan
>
> [OK. File was moved from /tmp to /opt/imc]
>
> ~ # mv /tmp/idxcan /opt/imc/
> mv: /tmp/idxcan: No such file or directory
>
> [Fair enough. Cause the file was moved.]
>
> ~ # ls -l /opt/imc/idxcan
> ls: /opt/imc/idxcan: No such file or directory
>
> [Oops!!! The mv that failed apparently deleted the target!]
I cannot reproduce this with 'my' busybox mv (which is some CVS/SVN
version after 1.00, but I didn't actually touch it yet).
More information about the busybox
mailing list