182

I am using Mac OSX. When I type ls -l I see something like

drwxr-xr-x@ 12 xonic  staff    408 22 Jun 19:00 .
drwxr-xr-x   9 xonic  staff    306 22 Jun 19:42 ..
-rwxrwxrwx@  1 xonic  staff   6148 25 Mai 23:04 .DS_Store
-rw-r--r--@  1 xonic  staff  17284 22 Jun 00:20 filmStrip.cpp
-rw-r--r--@  1 xonic  staff   3843 21 Jun 21:20 filmStrip.h

What do the @'s mean?

7 Answers 7

171

It indicates the file has extended attributes. You can use the xattr command-line utility to view and modify them:

xattr -l file # lists the names of all xattrs.
xattr -w attr_name attr_value file # sets xattr attr_name to attr_value.
xattr -d attr_name file # deletes xattr attr_name.
xattr -c file # deletes all xattrs.
xattr -h # prints help
5
  • 9
    In 10.8 (Mountain Lion), --list is not valid. It's -l. Oct 24, 2012 at 15:20
  • 5
    if you want to find all files of a type and remove the quarantine attr in OSX: find . -iname '*.ext' -print0 | xargs -0 xattr -d com.apple.quarantine. That's why I found this question.
    – jcollum
    Jun 26, 2015 at 21:13
  • 4
    also, for SEO: @ is the "at symbol"
    – jcollum
    Jun 26, 2015 at 21:14
  • Didn't work for me. Had to use xattr -d instead of --delete.
    – geoidesic
    Nov 28, 2015 at 10:35
  • 3
    @jcollum better yet, find . -type f -xattr -print | xargs -0 xattr -d com.apple.quarantine (not sure if the -type f is needed). Although for some reason neither command is working for me at the moment... This one worked for me: find . -type f -xattr -exec xattr -d com.apple.quarantine {} \;
    – Michael
    Mar 3, 2016 at 18:32
42

In Snow Leopard, at least, you can do this to show more information:

ls -l@
1
  • 1
    Right from the xattr manual: Attribute names can also be displayed using ``ls -l@''. Jun 14, 2017 at 19:52
3

It has extended attributes - See the OSX man page here for more information on ls.

1
  • The link doesn't work anymore. It redirects to the MacOS homepage. Oct 19 at 15:26
2

You may want to have a look at this post in the Apple mailing lists. It explains that the @ shows that the Finder has extended attributes other than ACL.

2

I think it means that the file/directory has extended attributes.

0

On OSX, this indicates the presence of metadata associated with the file.

2
  • It doesn't mean symbolic link on Linux either--symbolic links are denoted by an l in the first column of permissions, or broken links by a @ at the end of the path, not at the end of the permissions string.
    – B.R.
    Aug 10, 2010 at 19:51
  • Got it, edited.
    – kbyrd
    Aug 10, 2010 at 19:53
0

In addition to Michael Mrozek's answer:

On OSX 10.10 (Yosemite) you can have to use these attrx parameters:

xattr -l file
xattr -w attr_name attr_value file
xattr -d attr_name file

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .