I wonder if this is a bug or I just did it the wrong way. I can't seem to copy extended attributes of symbolic links. Example is to populate the upperdir of an overlayfs in Linux.
coreutils 8.21 libattr 2.4.47 I can only use mv to preserve extended attributes of symbolic links, and only when the destination is in the same filesystem. (It looks like mv summons copy when destination is in a different filesystem) Steps to reproduce: (The same happens in either ext2 or tmpfs) --- cut here --- touch a ln -sv '(overlay-whiteout)' b | ‘b’ -> ‘(overlay-whiteout)’ setfattr -hn trusted.overlay.whiteout -v y a setfattr -hn trusted.overlay.whiteout -v y b getfattr -hn trusted.overlay.whiteout a | # file: a | trusted.overlay.whiteout="y" getfattr -hn trusted.overlay.whiteout b | # file: b | trusted.overlay.whiteout="y" cp -vaP a c | ‘a’ -> ‘c’ cp -vaP b d | ‘b’ -> ‘d’ getfattr -hn trusted.overlay.whiteout c | # file: c | trusted.overlay.whiteout="y" getfattr -hn trusted.overlay.whiteout d | d: trusted.overlay.whiteout: No such attribute --- cut here ---
