How to find tagged files/folders using the command line in Terminal?
-
29-05-2021 - |
سؤال
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
لا تنتمي إلى apple.stackexchange