Info

Hi, I'm David Askew

I build things

Homepage

Contact Me

About

Open Source

Extended Attributes

I’m currently learning C the hard way and I noticed something new the other day while working in the terminal. I started noticing files that have an at-sign when listing files in the shell.

Example:

$ ls -l ex10.c
-rw-r--r--@ 1 username  staff  494 Jan 28 15:47 ex10.c

It turns out that the at-sign on OS X (Yosemite+ ?) denotes that a file has additional metadata that you can view. If you want to review this metadata, then all you have to do is use the “xattr” command.

If you read the man page for “xattr” it tells you its purpose is to:

“display and manipulate extended attributes”

Example:

$ xattr -l ex10.c
com.macromates.crc32: bf5ca3bb
com.macromates.selectionRange: 25:2
com.macromates.visibleIndex: 0

From the above command output, it appears as if this file was opened and saved via Textmate. I’m not sure what the values mean yet, but its something to investigate ….

I hope this helps!