Tag Your Config Files in OSX Mavericks

November 2013 ยท 2 minute read

I have always liked the concept of tagging. To me it helps organize without being too restrictive as having a predefined set of categories or even folders that I would have to manage. So when I saw the new features of OSX 10.9 Mavericks I was happy to see that tagging made it on that list.

Since I do a lot of web development and use the command line a lot I found that I have a shit load of configuration files all over my system. Projects live in one folder, Homebrew installs stuff in another, the hosts file is somewhere else, and Riak needs a launchd.conf file to exist with certain ulimit number set. WTF!?!?!

This is where Mavericks tags come in REALLY handy for remembering where everything lives and what custom changes I’ve made to my files. I have tagged all my configuration files and folders for quick terminal and Finder access.

Some of the paths I tagged are:

For now I just added the tags through Finder, but I had to add write permission to my account for a lot of the system files to able to modify them so be sure you do that if you want it to work. Listing all files on your system from the command line is a simple one liner and doesn’t require any extra scripts.

blainsmith@Blains-MacBook-Pro ~> mdfind "kMDItemUserTags == dev"

This is pretty nice, but if you don’t want to rely on Finder to add tags then schwa’s GitHub project, half-moon-tagging, looks interesting to manage all your tags from the commend line.

Hope this tips helps out and let me know what other uses you find for tagging files.