Show Hidden Files in Mac OS X
If you find yourself needing to access hidden files on your Mac, like an .htaccess file you downloaded, a .bash_profile, a .svn directory, – literally anything preceded with a ‘.’ indicating it is invisible by default – you can run the below command from the terminal to toggle hidden files to become visible.
For some quick background to fill in those who don’t know, files that are hidden in Mac OS are determined so by preceding the filename with a single period symbol (.), you can actually make any file hidden by placing a period in front of the name, thus making it invisible to the Finder. Let’s make all hidden files become visible in OS X:
Show Hidden Files on your Mac
This changes the default setting of Mac OS X so that Finder always shows all files. Launch the Terminal (found in /Applications/Utilities) and enter these commands exactly as shown. The first command activates the ability to see the hidden files:
defaults write com.apple.Finder AppleShowAllFiles TRUE
Hit Return, nothing happens yet because you must relaunch the Finder for the changes to take effect. This is done by ‘killing’ the Finder process, which is also done through the command line with the following string:
killall Finder
Again, hit Enter/Return, and you’ll discover the Finder quits and relaunches itself very quickly with the changes in effect.
“Hidden” files are now visible in Finder windows, but they will display as a dimmed version of their respective file icons, being slightly transparent. An example of this is highlighted below:

This setting stays in place until it has been reversed or disabled, which would cause all files to become hidden again just as the default. With all the files visible a Finder window can look much busier than you may be accustomed to, and it’s not always desired to leave on constantly. Thankfully it’s just as easy to switch back.
Reverse to Default & Make Files Hidden Again
To hide files that are intended to be hidden again, thus going back to the default Mac settings of keeping them invisible, you can just type the following defaults command. As you can see, everything is the same except that TRUE has been switched to “FALSE”:
defaults write com.apple.Finder AppleShowAllFiles FALSE
Hit return, and again you will need to kill the Finder so that it can relaunch for changes to take effect:
killall Finder
That’s all there is to it!
Show Hidden Files in a Mac Open or Save Dialogue Temporarily
Another approach to without using the above defaults command is to quickly show all hidden files in any Mac OS X Open or Save dialogue box by hitting Command+Shift+Period on the keyboard together. You will instantly see the change as once-hidden files are revealed.
That command sequence can be used to toggle back or forth, thereby revealing and hiding the files again as needed. For many users, this keystroke is the most appropriate use for when an invisible file must be modified but there is no need to make them all visible all the time.
Show Hidden Files on your Mac Temporarily through the Terminal
Another way to quickly see hidden files is by using the ls command within the Terminal, at the command line type the following:
ls -a
The -a flag tells the ls (list) command to show all contents, including hidden files. You then just have to specify a directory if you want to see the hidden files in it:
ls -a ~/Sites/betasite
This method does not effect the Finder or the visibility of hidden files outside of using the -a flag, making it a temporary measure to quickly see all contents of any directory or folder, even if the above defaults command isn’t used.
One way to carry over the terminal to the GUI though would be to use the ‘open’ command, directed at a hidden file. Here’s an example:
open .not_visible_by_default
This will launch the file called “.not_visible_by_default” into the default GUI app associated with it’s file type, in this case it would be a text file and so TextEdit would open. This trick can also be used to open hidden directories into the Finder, for example with the following syntax:
open ~/.git
That would launch the hidden “.git” directory in a users home directory into a Finder window, without revealing all other files.

There is a simple app you can install to do this, called “Blind” Check it out here: http://www.macupdate.com/info.php/id/22495/blind
or you could type in that command into the terminal which is far easier…. and also… this is old news how to do this in mac os x… old ancient news…
or you could just not leave an unnecessary comment and stop being a self-righteous macsnob…and also…you’re lame…and also…this is an old ancient post… and also… your mom
Terminal comes with your Mac… No download required.
Post = Necessary.
It’s funny to see the self-righteous of one bash the self-righteous of another. Go Linux.
Old, old, old news that, to this day, is still important because Apple doesn’t think its users need obvious ways to see hidden files. When software is written in a way that seems to imply that it knows better than its users what should be allowed (e.g. seeing “invisible files”), then the software writers are both arrogant and wrong.
Instead of YES it Should be TRUE
Try iTweax for a change. By far the best tweaking tool for osx.
It even has Safari4 beta support.
http://www.itweax.net
Tnomeralc, I’ve found an easy way to hide folders without buying an application. First, use the command listed above to show hidden files. Then, rename the folder you’d like to hide by adding a dot (.) at the beginning of the name. For example, “MyFolder” would become “.MyFolder”
After that, hide the folders again and you’re all set!
Hope that helps!
[...] can actually set Mac OS X to display hidden files by issuing a command in the Terminal. This will expose your hidden folder completely within the [...]
[...] you want a more permanent solution so that you can always see the files, check out our article to show hidden files on Mac OS, which offers a command to always see the hidden files even within the [...]
Sooo simple! though I’ve been a Mac user since 1987 I’ve never needed to hide a file. Now I do and I did in a few seconds. Thanxxxx
[...] Hidden Files in Mac OS X. Available: http://osxdaily.com/2009/02/25/show-hidden-files-in-os-x Last accessed 16th Nov [...]
[...] with a period are hidden by default in the Finder and the Mac dialog boxes. If you want to, you can set Mac OS X to always show hidden files by using a defaults write command. In this case, the Command+Shift+Period keystroke has the [...]
[...] you don’t want to bother with defaults write commands or the terminal, an alternate method to show hidden files in Mac OS X is to simply use the Chrome web [...]
Bifocals http://www.bifocalsapp.com/ offers a free menu bar app to do this as well.
[...] problem with traditional solutions like a defaults write command to show hidden files in Mac OS X is that they’re permanent unless another defaults write command is executed, this [...]
[...] have a .bash_profile, create one with your favorite text editor – you may need to do this in order to see it, as it will be a hidden [...]
Need to turn it on an off? I use it when working on volumes on a Mac OS X Server or other Unix boxes, typically for .htaccess files. I only need it on occasionally and don’t want the clutter or risk otherwise.
So using a plain text editor create two simple files with the commands to turn on and off. (TextEdit won’t do, but Word will save in plain text)
Make them executable with chmod thru Terminal. Use Finder’s Get Info to set them to open with Terminal
From then on you can double-click it to switch between showing and hiding.
[...] of the Terminal to create. It’s also advantageous because it doesn’t show up if someone makes hidden files visible. I would suggest burying this folder somewhere in an obscure place on the desktop or elsewhere to [...]
Thanks a ton! I’ve been using Houdini to reveal the .htaccess files so far but it’s far more convenient to have hidden files revealed by default.
[...] osXdaily [...]
[...] you don’t want to deal with manually hiding and showing the desktop icons, showing hidden files, accessing the user library directory, and forcibly emptying the Trash, grab DesktopUtility for [...]
[...] run the below command from the terminal. For those who don’t know, files that are hidden in Mac OS are determined so by preceding the filename with a single period symbol (.), you can actually make [...]
Great help – thanks man!
Any of you guys want to keep that particular folder or file at hand, after having hidden files again, without having to do the whole Terminal thing? (To me it’s quite scary to mess with the system like that, anyway.):
Drop the folder or file onto the sidebar of your Finder window. Now, you should be able to access it, directly and easily, in the future.
what about ~/private/var/vm ?!
this is the folder for creating huge snapshots of os which changes alot.
Just what I was looking for. Thanks.
[...] a networked Mac, using the Finder is an easy way to copy the SSH keys. First you’ll want to show hidden files in OS X either through defaults write or a tool like DesktopUtility, then just open up the .ssh [...]
[...] The fix is quite simple: go into your project directory, and locate a file called .snap which is listed under the following path on Mac OSX: .metadata/.plugins/org.eclipse.core.resources Once you have deleted this file, simply restart FlashBuilder and you should be good to go! *Note that you will need to turn on hidden files in order to see the .metadata folder, instructions on how to do that can be found HERE. [...]
I tried to hide the hidden files again but it wont work
Thank you so much for your contribution !!
[...] modified plist files will float to the top fairly quickly, though of you have hidden files shown, you’ll see temporary plist files show up first, ignore those and just focus on the normal [...]
ok, this may seem ridiculous but a bit of an amateur here, how do you access the terminal to type commands in? Am on a macbook running OS X 10.5.8
thanks.
Rebecca, Terminal is a utility. Look in your Utility folder (inside your Applications folder)
[...] and all root subdirectories (like ls -a / would show at the command line), you will need to set hidden files to be shown by the Mac OS X Finder. The directories and files deemed hidden by way of the chflags command or [...]
Thank you! Was in a pickle and really needed to see my hidden files. This command worked great.
[...] in mind that if you want to view hidden files through this method, you must enable hidden files to be shown in the Mac OS X Finder separately, which will then carry out through every folder until it is [...]
[...] writes commands and manually relaunching the Finder: hide desktop icons and show them again, show invisible files and hide them again, and show the user library or hide it again. No more launching Terminal to [...]
Whether this is old news or not, I didn’t know it, and I just tried it, and it worked. That is great. Thank you.
On some versions of the operating system, it requires a YES to enable, and a NO to disable, instead of TRUE or FALSE.
It will not give you any feedback if successful.
Do a killall Finder to see the change.
[...] who have a few Mac’s on their networks, where seeing the files turn up when hidden files are made visible. Here is my explanation as to what a DS_Store document is, what happens if you delete them, and how [...]
[...] it’s because the zipping tools default behavior is to including hidden files whether they are shown or not. That’s not necessarily a bad thing and in many cases it would be considered useful, [...]
Oh, please don’t be a crybaby ac_poster, MacOsXHints don’t owe hints and tips, they’re available for anyone – not copyrighted or nothing, so stop your whining and be happy for new Mac Users. Old ancient news you say, for whom? Those who have known for a while? For newbies it is News. – Instead consider this: Try search the internet for ‘show hidden files 10.6′. The first two hits are open/save dialogues, the third hit is this page. Instead try improving macosxhints’ GUI, it is not User Friendly when you find your tip in the comments below (jantonc)..