How to unhide files on Mac?

Solution 1:

chflags nohidden will unhide a hidden file/folder.

You can press Command+Shift+. to show all files regardless of any other state (in macOS Sierra and above.)

Alternatively, you can run the command defaults write com.apple.Finder AppleShowAllFiles true then relaunch Finder (any version of macOS.)

Solution 2:

It's chflags nohidden <filename>