1

I have gone through Windows versioning information: Please Check out Windows file versioning information

Now Windows provide quite an ample amount of information like productname, productversion, CompanyName, Comments, FileDescription and so on.

I went through mdls command and that information is very less compare to what Windows provide.

Does anyone have idea how to get equivalent information for Mac OS's (preferably in Sierra & El-Capitan) files as well ?

2

Applications on macOS store similar types of metadata in Info.plist files stored within the application bundles themselves.

For example to see the metadata available for Safari you can run the following command in a Terminal window.

plutil -p /Applications/Safari.app/Contents/Info.plist

Or to get the version of Safari specifically you can run...

plutil -p /Applications/Safari.app/Contents/Info.plist | grep CFBundleShortVersionString

1
  • 1
    This does provide lot of needed information, Thank you for your answer – spt025 Mar 1 '17 at 6:38
1

While helpful, the accepted answer is incomplete.

  • OP wanted a list of all file metadata in macOS.
  • The question is valid, but an exhaustive list don't exist afaik, as the set of metadata attributes is dynamic.
  • New keys are added e.g. whenever you install new software, and also appears to reflect which user is currently logged in.

1. The mdls man-page refers to the mdfind page under SEE ALSO:

$ man mdls
  (...)
  SEE ALSO
       mdfind(1), mdutil(1) xargs(1)

2. Looking up the mdfind manual

$ man mdfind
  (...)
      To get a list of the available attributes for use in constructing queries, 
      see mdimport(1), particularly the -X switch.

3. Querying mdimport

(today is December 24th, 2019 - on my desktop running macOS 10.15.2 (19C57)

$ mdimport -X
  (...)
Schema: id(501) {
    Attributes =     {
        MessageGUIDs =         {
            multivalued = 1;
            name = MessageGUIDs;
            nosearch = 1;
            type = CFString;
        };
        "_kMDItemDomainIdentifier" =         {
            multivalued = 0;
            name = "_kMDItemDomainIdentifier";
            nosearch = 1;
            notokenize = 1;
            type = CFString;
        };
        "_kMDItemUserTags" =         {
            multivalued = 1;
            name = "_kMDItemUserTags";
            nosearch = 1;
            type = CFString;
            uniqued = 1;
        };
        "com_DEVONtechnologies_think_DatabaseName" =         {
            multivalued = 0;
            name = "com_DEVONtechnologies_think_DatabaseName";
            type = CFString;
            uniqued = 1;
        };
  (...)

You must log in to answer this question.

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