Wednesday, March 16, 2011

Mac Tech Tip: chflags

I'm in the throes of my very-nearly-annual clean install of Mac OS X to my MacBook Pro (just to generally de-gunk; no other pressing reason). Of course this means I have to reinstall a lot of software (note to self: Hey self! You still need to restore World of Warcraft from your backup, stat!). Dropbox is helping me a lot this year; this time I don't have to recreate e.g., all of my password manager entries. That would be bad.

One of the more obscure things that I take for granted, always lose when I reinstall, and immediately miss is my symlink to /usr, which I like to create so I can use Finder to browse it. This year I decided to see if there was some better, native way to expose /usr to the Finder, and it turns out there is: chflags. One quick call to sudo chflags nohidden /usr, and I'm happily browsing. No muss, no fuss, no stretchmarks.