Paul Eggert writes:
 > On 12/11/23 12:03, Abraham S.A.H. via GNU coreutils Bug Reports wrote:
 > > a sane default behaviour regarding extended attributes in mv and others?
 > 
 > What's wrong with the default behavior in current GNU mv? Please give a 
 > specific example (specify platform, filesystems, mv version, etc.).

mv still silently discards the extended attributes when asked to move a file 
from
e.g. an ext4 fs to e.g., a VFAT one.

Again: the data is gone. mv lost the data.

For example (on Ubuntu 26.04, but this is probably irrelevant):

hm3$ mv --version
mv (GNU coreutils) 9.7
Packaged by Ubuntu (9.7-3ubuntu2)
Copyright (C) 2025 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Mike Parker, David MacKenzie, and Jim Meyering.

hm3$ getfattr myfile.txt 
# file: myfile.txt
user.myattr

hm3$ mv myfile.txt /run/media/dockes/C052-0E64/

hm3$ getfattr /run/media/dockes/C052-0E64/myfile.txt 

hm3$ mv /run/media/dockes/C052-0E64/myfile.txt .

hm3$ getfattr myfile.txt 


mv just casually discarding data...

You are asking what's wrong. IMO this is wrong.

If the target file system is full ("No space left on device"), mv keeps the
original file. It should do the same for an extended attribute problem.



Reply via email to