Using extended attributes to tag files(alexlance.blog) |
Using extended attributes to tag files(alexlance.blog) |
The system call to read these attributes is getxattr(), for anyone curious.
Eg: one could piggy-back an entirely new file onto an existing file (it might have to be text encoded?).
It looks like the kernel might impose a limit of 64KiB on a file's metadata, but that's still quite a lot of room for data smuggling...
One rule of thumb is `mv` will keep the attributes by default (given similar filesystem) and everything else needs tweaking/extra args. There's a section on it over here:
https://wiki.archlinux.org/title/Extended_attributes#Preserv...