2

The short man page of 'mdls' gives every indication that it should list all metadata by default. For some reason, I'm only getting a small portion:

vima@artemis[~]: mdls .bash_history

kMDItemFSContentChangeDate = 2018-02-04 18:56:51 +0000
kMDItemFSCreationDate      = 2018-01-04 17:41:32 +0000
kMDItemFSCreatorCode       = ""
kMDItemFSFinderFlags       = 0
kMDItemFSHasCustomIcon     = 0
kMDItemFSInvisible         = 1
kMDItemFSIsExtensionHidden = 0
kMDItemFSIsStationery      = 0
kMDItemFSLabel             = 0
kMDItemFSName              = ".bash_history"
kMDItemFSNodeCount         = 7376
kMDItemFSOwnerGroupID      = 20
kMDItemFSOwnerUserID       = 502
kMDItemFSSize              = 7376
kMDItemFSTypeCode          = ""

The missing metadata is still there, because I can call for it:

vima@artemis[~]: mdls -name kMDItemContentType .bash_history

kMDItemContentType = "public.data"

Any ideas why I'm not getting everything at once?

Thanks

  • Which version of macOS are you running? The output seems a bit odd, because my mdls does not output a newline at the start of the output - are you sure you haven't done something so that the first part of the output is hidden/removed by your terminal software or similar? - mdls shows the ItemContentType by default without problems. – jksoegaard Feb 6 '18 at 12:58
  • 10.13.3. Ignore the newline. I just ran it again, and mdls didn't output the newline, I must have done that accidentally when I pasted the output. Sorry about that. – avtraino Feb 7 '18 at 20:15

You must log in to answer this question.

Browse other questions tagged .