What commands do we have for finding tagged files/folders using find
on the command line?
I have done a search and looked on this site and found nothing.
What commands do we have for finding tagged files/folders using find
on the command line?
I have done a search and looked on this site and found nothing.
The correct command to perform Spotlight searches on the macOS Terminal command line is mdfind.
mdfind "kMDItemUserTags == '<your_tags_here>'"
The list all the kMD codes:
mdimport -A
Turns out you can do something as simple as:
mdfind 'tag:Blue'
Although this will only work in English locales
See this excellent answer that happens to discuss tags: https://stackoverflow.com/a/30281424/404459