micmath blog
RecentMysterious At-Sign: Extended Attributes in Mac Files
I was attempting to run an old perl script today, and doing a quick ls -la to check the permissions revealed a mysterious at-sign @ in the permissions.
-rw-r--r--@ 1 michael michael 467 8 May 13:16 cvsToSql.pl
Hi there little at-sign. What are you doing in there?
And do you know how hard it is to google the meaning of an at-sign in ls -la? Not easy. I did learn that a filename with a trailing at-sign can indicate a symbolic link on Linux. But this is Mac OS X Leopard and the at-sign is in the permissions. More googling....
The best answer is from dev.netcetera.org and Jeff Seitz’s Blog, and it is that the at-sign indicates that the file has extended file attributes. Hmmm... I want to get rid of those I think. Step one is to find out the name of the extended attribute.
$ xattr -l cvsToSql.pl
com.apple.FinderInfo:
0000 54 45 58 54 52 2A 63 68 00 00 00 00 00 00 00 00 TEXTR*ch........
0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Okay, so my file has some extra data attached to the "com.apple.FinderInfo" attribute. I suppose there is some important nerd-reason for that being there but I'm not interested: step two is to get it off.
$ xattr -d com.apple.FinderInfo cvsToSql.pl
And no more at-sign! All that files attributes are now of the non-extended variety.
