[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#52122: mv: deletes src file on error
From: |
Chris Elvidge |
Subject: |
bug#52122: mv: deletes src file on error |
Date: |
Fri, 26 Nov 2021 12:05:21 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 Lightning/5.4 |
On 26/11/2021 11:07 am, Frank Busse wrote:
Hi,
Given two files: an old version of "foo" on a mounted USB stick:
/mnt/dst/foo
and a new version of "foo" in /src/foo on the system's hard drive. When
I do:
sudo mv /src/foo /mnt/dst/foo
I get the following error:
mv: failed to preserve ownership for '/mnt/dst/foo': Operation not permitted
Is your USB stick (V)FAT(32) (or similar) formatted?
The error is fine but mv deletes /src/foo and keeps mnt/dst/foo,
meaning that the data of the new file is lost. Is this the intended
behaviour? I'm using Coreutils 9.0.
Didn't reproduce this (as root).
mv (GNU coreutils) 8.32.179-c7577
Kind regards,
Frank
--
Chris Elvidge