1

Using xattr -w I want to write a proprietary extended attribute (XA) and an additional user tag to files. This also needs to happen on other volumes than the boot volume.

On specific volumes, however, e.g. on an attached exFAT-formatted SSD or on a mounted NAS volume, macOS XAs are written as Apple Double files: foo becomes foo plus ._foo. Since I can't know in advance, whether users have a process running that auto-deletes these kind of files (like the BlueHarvest app), I would rather write the XA contents to a proprietary dotfile in the same directory as the target file, and not use xattr at all. (That would be a single dotfile per directory, not per file.)

But for that I would need a shell-script-compatible method to determine if macOS XAs are supported on a specific volume.

Is this possible? If yes, how? If not, do only AFPS and HFS+ volumes support these XAs? If the latter is true, I could probably just run diskutil info "foo" | awk '/File System Personality:/{print $4}', and forgo xattr if the output is not AFPS or HFS+.

Related question: what about NTFS- or ext4-formatted volumes mounted as read/write using e.g. Paragon drivers? These volumes support XAs, NTFS at least to some extent, but do they actually support XAs written by xattr on macOS?

0

You must log in to answer this question.

Browse other questions tagged .