I am running Mac OS X 10.8 (Mountain Lion) and had to edit an invisible file as part of an Android project. While I eventually found it, Spotlight was of no help, since it could not find an invisible file when searching for the exact name (.classpath) and with the 'File Visibility' option set to 'Visible or Invisible'.
Why didn't Spotlight work in this instance?
Best Answer
Though, it won't update the results in spotlight I use the below script to toggle hidden files on and off every time it's run:
To make:
TextEdit
Format > Make Plain Text
from the menu)togglehidden.command
(be sure not to append .txt to the end of the file)/Applications/Utilities/Terminal
chmod u+x ~/Desktop/togglehidden.command
to make your new file executable.togglehidden.command
on your desktop to show or hide hidden files.