bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#13601: mv should not silently lose file extended attributes


From: Paul Eggert
Subject: bug#13601: mv should not silently lose file extended attributes
Date: Sat, 15 Aug 2026 14:28:57 -0700
User-agent: Mozilla Thunderbird

On 2026-08-15 13:57, PƔdraig Brady wrote:

Note cp does give warnings if you explicitly ask it to preserve xattrs:

 Ā  $ cp --preserve=xattr file.attr vfat/
 Ā  cp: setting attributes for 'vfat/file.attr': Operation not supported

Since mv ordinarily acts like 'cp --preserve=all' when copying, presumably mv 
should warn in this situation if cp warns.

Also, if no mv options other than -i and -f are used, a diagnostic is needed to conform 
to the spirit of POSIX, as the POSIX spec says for this situation "If the 
duplication of the file characteristics fails for any reason, mv shall write a diagnostic 
message to standard error, but this failure shall not cause mv to modify its exit 
status."[1] Contrary to the original bug report POSIX does not require (and 
seemingly does not allow) the mv to be aborted if file characteristics are lost in the 
copy, but at least the user should be warned about the situation.

[1]: 
https://pubs.opengroup.org/onlinepubs/9799919799/utilities/mv.html#tag_20_83_03





reply via email to

[Prev in Thread] Current Thread [Next in Thread]