I don't know of a way to do it with xattr
, but there's an old filesystem trick you can use. Note: this is basically obsolete, but still works in 10.8.2; I make no promises about 10.8.3 etc. If the attribfile is in hex format, use this:
xxd -r -p attribfile >File/..namedfork/rsrc
If the attribfile is raw, use cat
instead of xxd -r -p
. If the attribute is something other than the resource fork, ... I have no idea.