Specifications

96 Chapter 7 Working with Disks and Volumes
To view the metadata of a file:
$ mdls
filename
The computer responds with something similar to the following output:
<
filename> -------------
kMDItemAttributeChangeDate = 1970-01-01 00:43:07 -0600
kMDItemFSContentChangeDate = 2005-10-03 22:04:19 -0500
kMDItemFSCreationDate = 2005-10-03 22:04:19 -0500
kMDItemFSCreatorCode = 0
kMDItemFSFinderFlags = 16384
kMDItemFSInvisible = 1
kMDItemFSIsExtensionHidden = 0
kMDItemFSLabel = 0
kMDItemFSName = "
filename
"
kMDItemFSNodeCount = 0
kMDItemFSOwnerGroupID = 0
kMDItemFSOwnerUserID = 0
kMDItemFSSize = 4330232
kMDItemFSTypeCode = 0
kMDItemID = 634516
kMDItemLastUsedDate = 2005-10-03 21:04:19 -0500
kMDItemUsedDates = (2005-10-03 21:04:19 -0500)
To perform a Spotlight search using the mdfind tool:
$ mdfind “kMDItemAcquisitionModel ==’Canon Powershot S45’”
/Users/anne/Documents/vacation1.jpg
/Users/anne/Documents/vacation2.jpg
/Users/anne/Documents/vacation3.jpg
/Users/anne/Documents/vacation4.jpg
Controlling Spotlight Indexing
By default, indexing of volumes in Mac OS X Server is disabled. However, you can use
the mdutil tool to enable or disable indexing on a volume.
To enable indexing on a volume:
Run the mdutil tool with root privileges and set the indexing status to on.
$ sudo mdutil -i on
volume
To disable indexing on a volume:
Run the mdutil tool with root privileges and set the indexing status to off.
$ sudo mdutil -i off
volume
For more information, see the mdutil man page.