permanently display hidden files or folders

How can i permanently display hidden individual files or folders?

MacBook Pro, Mac OS X (10.7.3)

Posted on Apr 9, 2012 6:37 AM

Reply
Question marked as Top-ranking reply

Posted on Apr 9, 2012 6:53 AM

In terminal paste this line at the prompt

defaults write com.apple.finder AppleShowAllFiles True; killall Finder

Press return.


To hide them again


defaults write com.apple.finder AppleShowAllFiles False; killall Finder

Those will unhide all, for individual files paste


sudo chflags nohidden

Then drag the file or folder you want unhidden to your Terminal window.

It will now show the path to the item.

Press Return.

8 replies
Question marked as Top-ranking reply

Apr 9, 2012 6:53 AM in response to kh4l

In terminal paste this line at the prompt

defaults write com.apple.finder AppleShowAllFiles True; killall Finder

Press return.


To hide them again


defaults write com.apple.finder AppleShowAllFiles False; killall Finder

Those will unhide all, for individual files paste


sudo chflags nohidden

Then drag the file or folder you want unhidden to your Terminal window.

It will now show the path to the item.

Press Return.

Apr 9, 2012 9:06 AM in response to kh4l

sudo chflags nohidden /private


should unhide /private regardless of the current working directory, but if you want to unhide a symbolic link such as /etc (which points to /private/etc) , then I believe you need the -h option (new in Lion):


sudo chflags -h nohidden /etc


Otherwise /etc gets followed to /private/etc, and that etc subfolder is already unhidden.

Apr 9, 2012 7:25 AM in response to macjack

Thanx macjack but after using sudo chflags nohidden method, this is the result I get when i want to 'unhide' the 'private/etc' folder only:


usage: chflags [-fhv] [-R [-H | -L | -P]] flags file ...

Macs-MacBook-Pro:~ mac$ sudo chflags nohidden/private/etc

sudo: /var/db/sudo writable by non-owner (040777), should be mode 0700



WARNING: Improper use of the sudo command could lead to data loss

or the deletion of important system files. Please double-check your

typing when using sudo. Type "man sudo" for more information.



To proceed, enter your password, or type Ctrl-C to abort.



Password:

usage: chflags [-fhv] [-R [-H | -L | -P]] flags file ...


What can I do?


Thanx

Apr 9, 2012 7:48 AM in response to kh4l

The /var/db/sudo directory is a special folder that contains directories with a "timestamp" used by sudo users. Sudo will not work if the directory doesn't have the permissions set to 0700. Repair permissions should correct the issue. The /private/etc/ directory is not hidden. The parent directory /private is. To reveal the /etc directory then set the nohidden bit on the symbolic link /etc ->

sudo chflags nohidden /etc

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

permanently display hidden files or folders

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.