you can’t do this from finder. it has to be done from terminal.
To unhide: chflags hidden (path of file or folder)
To unhide: chflags nohidden (path of file or folder)
replace (path of file or folder) with unix path of your file or folder. The easiest way to do this is to drag the file or folder to the terminal window.
To view the hidden file or folder
go to finder: press Shift+command+G together (make sure you are in the same directory where hidden file or folder located), it pops a window, give the name of hidden file or folder, that’s it now you can see it.
To view the hidden file or folder from any location
press Shift+command+G together, give the name of hidden file or folder with full path (eg: /Users/xxxxx/Desktop/music.txt).