186

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?

Jonik
  • 1,480
Larry Wang
  • 2,675
  • 4
  • 20
  • 11

7 Answers7

175

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
Michael Mrozek
  • 93,103
  • 40
  • 240
  • 233
  • 9
    In 10.8 (Mountain Lion), --list is not valid. It's -l. – Mark E. Haase Oct 24 '12 at 15:20
  • 6
    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 '15 at 21:13
  • 4
    also, for SEO: @ is the "at symbol" – jcollum Jun 26 '15 at 21:14
  • Didn't work for me. Had to use xattr -d instead of --delete. – geoidesic Nov 28 '15 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 03 '16 at 18:32
42

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

ls -l@
Kevin Cantu
  • 3,794
3

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

Frozenskys
  • 707
  • 2
  • 8
  • 12
2

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

Kevin
  • 40,767
jmoro
  • 121
  • 5
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.

zugaldia
  • 151
  • 3
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
0

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

kbyrd
  • 1,416
  • 14
  • 18
  • 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 '10 at 19:51
  • Got it, edited. – kbyrd Aug 10 '10 at 19:53