(1) I googled mac tagging. I know the tagging was stored in HFS+ file system's extended attribute. But when I create tags in SMB shares (which are ext4 and ntfs on the network), I find out the tags work fine in SMB shares too. Does it mean macOS add tag info to ext4 and ntfs's extended attributes?

(2) In SMB shares, tag -l filename shows the tag info. BUT mdls filename does not show the tag info. why?

(3) With an external USB drive in JHFS+ format, I find out tags indexing works very well. If I add a tag by tag -a foo filename, I can find the file with Spotlight and tag -f foo. I am wondering how the tag indexing works with external drive. What if I unplug this external drive, will spotlight delete the index cache directly? If it deletes the index, what if I add the external drive again? Will it index all the files from scratch again? That will take too much time and cpu resources if spotlight need to index tags from scratch everytime when I unplug and plug the external drive.

(4) I know I can find all tag names from Finder --> Tags --> All Tags UI. But how can I list all tags in command line? I failed to find a way by google. I tried to look at help doc on tag, mdls, mdfind, and xattr, but so far, I don't find a solution. I think it's important to list all tag names I used because I use a lot and won't be able to remember all of them.

Thank you very much for your help and sorry to ask many questions in one since I think they are related to each other.

You must log in to answer this question.

Browse other questions tagged .