How to list all OS/X extended file attributes

I'm on Catalina. If you do a search, you may search based on a huge list of "search attributes," (see image) which I assume are all extended file attributes. I want to be able to see ALL of these attributes for a file and have not been able to find a way, even in Terminal (I've tried xattr and ls -@l, but those don't get it, not even close). Any ideas? Don't mind using a shell or script... Thanks! - Bee

Mac mini, macOS 10.15

Posted on Jun 17, 2022 11:30 AM

Reply

Similar questions

4 replies

Jun 17, 2022 4:48 PM in response to bee61

Howdy,


That is a very extensive list. It amazed me too.

Not all of those search attributes are metadata for the file. A simple example is Contents: Text content of this item.

And of course, not every file will have the same metadata as another file.

For example, a picture may have Aperture Value, but not Audio bit rate.


The simple way to see the metadata is to Get Info on the file.

From: Narrow your search results on Mac

To view metadata for a file, select the file, then choose File > Get Info.


Some examples:

Although I'm currently booted to Big Sur, the article linked is for Catalina and it should work there too.


ivan

Jun 18, 2022 11:09 AM in response to bee61

bee61 wrote:

I'm on Catalina. If you do a search, you may search based on a huge list of "search attributes," (see image) which I assume are all extended file attributes. I want to be able to see ALL of these attributes for a file and have not been able to find a way, even in Terminal (I've tried xattr and ls -@l, but those don't get it, not even close). Any ideas? Don't mind using a shell or script... Thanks! - Bee
https://discussions.apple.com/content/attachment/726fd32d-0d5d-4054-b268-197f50a7651a



ref: https://apple.stackexchange.com/questions/324303/is-there-a-way-to-get-spotlight-to-search-for-xattr


Jun 18, 2022 10:22 AM in response to ivan54

<chuckle> Thank you, but yes, I know all about get info, I hadn't thought to mention it as it is so basic. You are right though, not every file is going to have every attribute given there, but it appears that some files will have more attributes than others specific to their type and that this is held... somewhere? xattr just gives me something like:


com.apple.macl

com.apple.metadata:kMDItemDownloadedDate

com.apple.metadata:kMDItemWhereFroms

com.apple.quarantine


That's not very useful (I'm trying to find out when the file was by the author, not when I first saved it). I may be tilting at windmills. I've heard some people using fileXray. I may try that and see...

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to list all OS/X extended file attributes

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.