I am trying to repair a friend's USB drive that got a virus. All directories became .lnk and the original ones were hidden. I don't know how to permanently show the folders.
sudo chflags nohidden /path but it doesn't work permanently.
There are a couple of ways to do this:
To show all hidden files:
defaults write com.apple.finder AppleShowAllFiles YES; killall Finder
To hide hidden files:
defaults write com.apple.finder AppleShowAllFiles NO; killall Finder
With an application
You can download one of many applications that do this on mouse click. There are many, but the first one that comes up in a google search is Show Hide Invisible Files.