GNU bug report logs - #52122
mv: deletes src file on error

Previous Next

Package: coreutils;

Reported by: Frank Busse <f.busse <at> imperial.ac.uk>

Date: Fri, 26 Nov 2021 11:10:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#52122: closed (mv: deletes src file on error)
Date: Fri, 26 Nov 2021 18:19:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 26 Nov 2021 10:18:44 -0800
with message-id <9dd8c2ea-ad1f-487c-0a61-21713933e34a <at> cs.ucla.edu>
and subject line Re: bug#52122: mv: deletes src file on error
has caused the debbugs.gnu.org bug report #52122,
regarding mv: deletes src file on error
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
52122: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=52122
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Frank Busse <f.busse <at> imperial.ac.uk>
To: bug-coreutils <at> gnu.org
Subject: mv: deletes src file on error
Date: Fri, 26 Nov 2021 11:07:09 +0000
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

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.


Kind regards,

Frank


[Message part 3 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Frank Busse <f.busse <at> imperial.ac.uk>, Chris Elvidge <celvidge001 <at> gmail.com>
Cc: 52122-done <at> debbugs.gnu.org
Subject: Re: bug#52122: mv: deletes src file on error
Date: Fri, 26 Nov 2021 10:18:44 -0800
On 11/26/21 04:23, Frank Busse wrote:
> I
> guess it was a hiccup somewhere else in the system, sorry.

Thanks for following up; closing the bug report.


This bug report was last modified 3 years and 177 days ago.

Previous Next


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