ls command: What does the @ in file mode mean, and how to get rid of it? [duplicate]

After I download files on OSX and then want to use them, they often have an @ appended on the file mode whenever I do a ls -l. Here is an example output, see the @ near the beginning of the line:

ls -l *.php
-rw-r--r--@ 1 username  staff  11179 Dec 17  2010 class.mysql.php
-rw-r--r--@ 1 username  staff     24 Nov  1  2010 info.php
-rw-r--r--@ 1 username  staff     61 Dec 23  2010 page.php
-rw-r--r--@ 1 username  staff   1157 Dec 17  2010 photo.php

I think it is some kind of locking meganism, is that right? And how do I get rid of it?


Solution 1:

From the ls manual (man ls) section The Long Format

If the file or directory has extended attributes, the permissions field printed by the -l option is followed by a '@' character.

You can then display the extended attributes with -@

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

To manipulate extended attributes you can use the xattr command. See for example How do I remove the extended attributes in Mac OS X or Dealing With Extended Attributes on OS X