Home » Questions » Computers [ Ask a new question ]

What does the @ mean on the output of "ls" on OS X' terminal?

What does the @ mean on the output of "ls" on OS X' terminal?

When doing an ls in a directory I get the following output:

Asked by: Guest | Views: 169
Total answers/comments: 3
Guest [Entry]

"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."
Guest [Entry]

"The ""@"" means that the file has ""extended attributes"" associated with it.

If you do ""ls -@ -l"", you can see what attributes there are for each file. You can also do something like ""xattr -l pgsql.so"" to dump the attributes for a particular file.

Typically they're stuff like old-school FinderInfo, text encoding info, or the ""quarantine"" info that gives you the ""This file was downloaded from the web, are you sure you want to open it?"" warning."
Guest [Entry]

"From the man page of ls:

The Long Format
[…] If the file or directory has extended attributes, the permissions field printed by the -l option is followed by a '@' character. […]"