There is no intuitive direct way to hide/unhide files on Mac (at least without using some utility). Apart from the files starting with ‘.’, there can be other forms of hidden files with some implicit flag that makes it tough to unhide them by just renaming in terminal.
This script makes all the hidden files visible-
defaults write com.apple.Finder AppleShowAllFiles YES
Type this in terminal and relaunch Finder. Revert back using ‘NO’ in the command.
To selectively hide/unhide files, use this command on terminal-
/Developer/Tools/SetFile -a V 'filename'
One Comment
its not yes or no command that worked for me it was TRUE and FALSE