Possible Duplicate:
what does the @ mean on the output of ls on os x terminal?

when I type ls -la I get this familiar output...

drwxr-xr-x+  38 kent  staff       1292 Nov  6 11:09 .
drwxr-xr-x    5 root  admin        170 Aug 14 14:11 ..
-rw-r--r--@   1 kent  staff         16 Jun 18 14:13 .AB64CF89
-rw-------    1 kent  staff          3 May  5  2009 .CFUserTextEncoding
-rw-r--r--@   1 kent  staff      15364 Nov  6 11:11 .DS_Store

my question is about the file settings on the far left eg:

drwxr-xr-x+

I know that the first char 'd' means directory. and the next 9 chars I understand as well (permissions) but what is the final char in this field? (empty | + | @ )

thanks in advance!

link|improve this question
feedback

migrated from stackoverflow.com Nov 6 '09 at 13:11

This question came from our site for professional and enthusiast programmers.

closed as exact duplicate by Daniel Beck, Diago Jan 26 '11 at 15:40

This question covers exactly the same ground as earlier questions on this topic; its answers may be merged with another identical question. See the FAQ for guidance on how to improve it.

3 Answers

From the ls(1) man page on Mac OS 10.6.1:

If the file or directory has extended attributes, the permissions field printed by the -l option is followed by a '@' character. Otherwise, if the file or directory has extended security information (such as an access control list), the permissions field printed by the -l option is followed by a '+' character.

From the available options list:

 -@      Display extended attribute keys and sizes in long (-l) output.

 -e      Print the Access Control List (ACL) associated with the file, if present, in long (-l) output.

These will let you see the value of those extended options. FWIW, ACL info can be set using the same chmod(1) utility you are probably already aware of. :-)

There doesn't appear to be an easy way from the command line to do anything with extended attributes.

link|improve this answer
Extended attributes can be viewed and manipulated with the xattr command (only available in OS X v10.5 and .6). It doesn't seem to have a man page, but xattr -h will print its internal help. – Gordon Davisson Nov 6 '09 at 20:28
feedback

This is related to extended attributes and access control.

From the man page of sun ls:

The character after permissions is an ACL or extended attributes indicator. This character is an @ if extended attributes are associated with the file and the -@ option is in effect. Otherwise, this character is a plus sign (+) character if a non-trivial ACL is associated with the file or a space character if not.

link|improve this answer
feedback

From the man page for ls:

If the -l option is given, the following information is displayed for each file: file mode, number of links, owner name, group name, number of bytes in the file, abbreviated month, day-of-month file was last modified, hour file last modified, minute file last modified, and the pathname.

In addition, for each directory whose contents are displayed, the total number of 512-byte blocks used by the files in the directory is displayed on a line by itself, immediately before the information for the files in the directory.

If the file or directory has extended attributes, the permissions field printed by the -l option is followed by a '@' character. Otherwise, if the file or directory has extended security information (such as an access control list), the permissions field printed by the -l option is fol-lowed followed lowed by a '+' character.

Use:

ls -la@e

for more information on files or directories with those attributes/information.

link|improve this answer
feedback

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