Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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. I've used sudo chflags nohidden /path but it doesn't work permanently.

share|improve this question
add comment

3 Answers

There are a couple of ways to do this:

In Terminal

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.

share|improve this answer
add comment

chflags nohidden should be permanent, but it doesn't affect files that start with a period.

This makes Finder show all hidden files:

defaults write com.apple.finder AppleShowAllFiles -bool true; killall Finder
share|improve this answer
add comment

Files & folders that start with a period will always be hidden in the Finder, and in Terminal listings (ls command, unless you use the -a flag i.e. "ls -a"), If renaming the folders is acceptable, then just remove the period from the folders you want to show.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.