mdls
From Mac Guides
|
This tip requires |
mdls is a Terminal command for listing metadata contents of any file, as seen by Spotlight. It accepts a filename as an argument and returns a list of metadata, in a key=value pair. The results may easily be filtered with grep, or initially constrained to provide the appropriate data.
[edit]
Examples
To list all the metadata of a file called "Picture.jpg" in your Documents folder:
mdls ~/Documents/Picture.jpg
To return just the width of an image:
mdls -name kMDItemPixelWidth Picture.jpg
[edit]
Man Page Excerpt
The mdls command prints the values of all the metadata attributes associated with the files provided as an argument.
[edit]

