From How to make /opt visible in Mac OS X Finder:

$ sudo SetFile -a v /opt
grab-001.png