Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any risk associated in creating your own custom extended file attributes? For instance:

  1. should I be worried about naming collisions?
  2. is there any file instability or increased risk of data loss associated with adding extended attributes?
  3. is there anything else I should be concerned about that I'm not thinking of?

Extended attributes could be very useful to me for keeping track of file metadata that doesn't have any where else to be kept, and which I would like to keep about my important files with my important files. But I'd like to know what possible downsides there are before I start adding them to my files.

share|improve this question
up vote 2 down vote accepted

So far the only risk I've found is that some applications will overwrite the custom extended attributes. TextEdit is one such example. It will remove the attribute and add a quarantined attribute in its place, which will cause the Finder to give you a warning (that it was downloaded from the internet) when you open it.

So if you don't want to lose the metadata you've added to your custom attributes, don't open in unsafe applications like TextEdit. TextMate and SublimeText 2 and vim don't damage your data, however.

(And as for name collisions, just follow the reverse DNS naming that Java uses. For example 'com.yourdomain.yourcustomname'.)

share|improve this answer
I've seen TextEdit remove xattrs, but not add quarrantine xattrs; what circumstances have you seen this? – Gordon Davisson Mar 16 '13 at 19:23
Just opening a file from TextEdit, editing, and saving. I don't know if it's relevent, but the file was an empty file that I created with touch filename, and that I added an attribute to with xattr -w attribute "some text here". – iconoclast Mar 16 '13 at 20:55
Since no one else is answering, I'll go ahead and accept my own answer, but I'll gladly switch to an answer that is better than mine (and is substantially new). – iconoclast Mar 19 '13 at 0:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.