Hide, unhide files on OS X

Case: You have a file that is both invisible (you have to use ls -a in order to see it), and hidden from the GUI (you cannot see an icon for it in Finder.

You want to make it visible - so that you can see it in the STDOUT when you type ls.

Check out the SetFiles - something that comes with Apple's Developer Tools.

man SetFiles

SetFiles -a V

You want to unhide it so that it will show with an icon in Finder.

Checkout chflags. No Developer Tools required.

man chflags

You just want to be able to see all the files no matter their intrinsic hidden/nohidden, invisible/visible status.

defaults write com.Apple.Finder AppleShowAllFiles YES

or

defaults write com.Apple.Finder AppleShowAllFiles TRUE

Follow that up with...

killall Finder

Use the same command, but replace the last argument with NO/FALSE to go back to normal Finder functionality.

Some voodoo right here in this joint.

Source:

MacRumors Forum