How to check a file’s spotlight tags (especially on a server)

Many thanks to this post for this info.

I recently tagged some files on my Synology NAS mounted with AFP (Finder Go menu, Connect to Server, afp://SERVER.local/VOLUME) but they were not showing up in the Finder.

I still do not know why the Finder is now showing them (the Finder is so problematic) but I did discover how to determine if the tag had been added to the file.

OS X stores the tags in the file’s metadata and I was not sure if Synology’s ext4 would store them or not. You can use the terminal to print out the file’s tags. This is a bit cumbersome as the file as to go in the middle of the command.

The command is:

In this example, replace YOURFILE with the name of your file. Make sure to use “\ ” for every space (or Terminal will think you are starting a new command). For example, if your server’s volume name is “My Server” and the file you want to check is in a folder named “My Files” and the file is named “filetocheck.txt” then the command would look like this:

You will see output similar to this: