How can Finder permanently show a specific file starting with a dot/period?

I have a folder on my Mac that I will set up to git-sync with a folder on my web server. I’d like to be able to see the .htaccess file in this folder without having to unhide hidden files all over the system. Is that possible?

I’m using Mac OS X 10.6.8 (Snow Leopard).

(Mike Scott mentioned in How to show hidden files and folders in finder? that this might not be possible to show only specific files/folders that start with a dot but it would be nice with a definite answer – and instructions for how to do it, if it is indeed possible.)


Solution 1:

One way to get around this would be to create a symbolic link to .htaccess and call it something without a dot. For example:

$ cd site_root
$ ln -s .htaccess htaccess

Then you can open htaccess from Finder and you'll actually be editing the .htaccess file.

(You could even make the second command ln -s .htaccess " .htaccess", which would visually look like .htaccess but be visible because of the leading space.)

Solution 2:

If you do not wish to use a symbolic link (which is a good workaround), as mentioned in another answer, you can use the free app invisibliX to toggle the visibility of hidden files quickly or to hide specific files. You can even set your own keyboard shortcut from System Preferences > Keyboard.

This is easier to use than resorting to the Terminal to change Finder settings back and forth.

If you wish to see hidden files in Open/Save dialogs, pressing Cmd+Shift+. (dot/period) would toggle the visibility of files.

Solution 3:

Nope. That's a feature.

Either you show all files starting with dots or you hide them all.

chflags hidden myFile can make hide a file but not unhide files hidden because of the dot.