- Advanced Mac users, including developers, often have to enter commands to display hidden files. Show Hidden Files for Mac allows this to be accomplished with the click of a button, although this.
- It seems like every day I search Google for the command to show hidden files on Mac OS X, not to mention Googling for the command to then hide those hidden files a few minutes later. Today I decided to make a short and easy to remember alias to speed up the process.
This method has been posted all over the place, but I haven’t found a good step-by-step walkthrough that explains how and why to show hidden files on a Mac. As my students frequently ask for it, I’m posting here to keep in a reference.
For those who want to view hidden files and folders on a mac, here’s how you can do so. How to View Hidden Files and Folders on Mac OS X Yosemite. Note: The following instructions have been tried and tested on Mac OS X 10.10 Yosemite. Open Terminal on your Mac and Type in the following command and press enter. As a Mac owner, if you want to show those hidden files in Mac OS X, here is a method. Mac Terminal is one of the most popular apps used and eulogized by experts. This app allows you to control Mac OS X by using the command line to enter Unix commands. In a way, Terminal works as car bonnet, which you can open and check entire engine.
Update Aug 2019: you can do it with a simple keyboard shortcut
– (jump down to keyboard update).
– (jump down to keyboard update).
Update 2014: there’s a third-party app for this now
– (jump to app update)
– (jump to app update)
Who’s hiding what?
Have you ever noticed the “extra” files that you can see in your FTP client, yet seem to be missing from the local version of the site on your computer? Chances are, those files are on your local computer too, you just can’t see them. Mac OSX (and other operating systems) hide them by default so there’s less clutter, and so you don’t accidentally delete something important.
The most common example that I come across is the .htaccess file, because I work with WordPress frequently. Note how it begins with the period (dot) because htaccess is actually the file extension, not the file name. Most hidden files will begin with a period.
Sometimes when you’re coding for the web, you need to see the .htaccess and other hidden files to change something about your server setup, usually permalink and server configurtations.
Show hidden files on a Mac
To show hidden files, first open up the Terminal app. If you’ve never used this, it’s here:
Applications → Utilities → Terminal
The terminal window that pops up should look something like this, with your hard drive and user name in place of mine.
A quick note before you do anything: using Terminal without knowing what you’re doing can really screw up your computer. It’s not unsafe to do, you just have to be very careful not to type in any commands that you don’t intend to. As such make sure you’ve read the code below carefully and have typed it exactly as written! You have been warned.
Okay now, right after the dollar sign you can go ahead and type or paste in the code below, and press enter.
Nothing will happen yet, because you need to restart Finder for the changes to take effect. To do this, you can either press option+command+esc to open the Force Quit Applications window, select Finder from the list and hit “Relaunch”, or simply type in the code below in the Terminal window, and again press enter.
If you typed those lines correctly, your desktop icons should disappear for just a second while Finder restarts and the code in your finder window will look like the image screenshot below.
View Hidden Folder Mac
Now any hidden files on the system should be visible. If you’re not seeing the file you expected, it’s possible that your FTP client is not configured to pull down those hidden files, so you may need to check those settings also. And remember, deleting any system files can break stuff on your computer—if you’re going to go through this process, make sure you’re only editing stuff you know is pertinent to your site, like the .htaccess file.
And, since you don’t want to delete something by mistake, you probably want to hide the files again when you’re done editing your site…
Hide the files again
Back in the Terminal window, we need to basically write the same code again—this time we’re just changing the value of AppleShowAllFiles back to the default of FALSE:
Again, you need to restart Finder just like you did before with killall Finder or the Force Quit Applications window. And that’s, that.
Update: there’s an app for that.
(5/28/2014)
I just came across a free, lightweight app called Funter that does this for you, and runs unobtrusively in the task bar. (There were lots of apps that did this previously, but they were neither free, nor lightweight.)
I just came across a free, lightweight app called Funter that does this for you, and runs unobtrusively in the task bar. (There were lots of apps that did this previously, but they were neither free, nor lightweight.)
Maybe that’s a better option for some folks.
Update Aug. 2019: there’s a keyboard shortcut for that.
(8/20/2019)
As Alesh has commented below, this is now as easy as a keyboard shortcut:
As Alesh has commented below, this is now as easy as a keyboard shortcut:
Hitting the period key while holding down Command and Shift, ⌘-⇧-. will show hidden files in finder. Hit it again and they disappear again.
I can confirm that the ⌘-⇧-. method is working in macOS Mojave version 10.14.5 as of Aug 2019.
Thanks so much Alesh for the comment!
Show Hidden Files Mac Os X Lion
Categorized under Mac OS X
WhatsaByte may collect a share of sales or other compensation from the links on this page.
The show hidden files Mac OS X guide!
![Files Files](/uploads/1/1/9/8/119876164/257295977.jpg)
Did you know how to show hidden files on Mac OS X computer yet? It’s not similar to what you do in Windows. There is a bit more complicated and require you to type a few commands in Terminal in Mac OS X to show those hidden files.
My story is that I just switched to Mac OS X a few months ago. At that moment, I was just learning how to use this new operating system, from how to install or uninstall apps, copy and paste files, as well as, take screenshots. One day, I was wondering how to view system files that are hidden like in Windows? With the help of Google and information from a few sources, show or hide hidden files never been easier, especially doing that using short alias commands instead of typing long commands, which aren’t easy to remember.
In Mac OS X, by default, all files that starting with a dot (“.”) before the file name are always invisible, including .bash_profile, .svn directory, or even .htaccess file. If you want to access these files, you need to make it visible.
[full-related slug1=”how-to-print-screen-mac-os-x” slug2=”how-to-force-quit-mac-apps-with-shortcut”]Before reading this guide, you may think to make hidden files to viewable is hard. But don’t worry! Today, I write this simple guide to show you the easiest way to show hidden files on Mac OS X computer. You only need to type a few long commands in Terminal application once. Next time, you just need to use showFiles and hideFiles commands to show or hide hidden files on Mac.
Use Terminal Commands To Show Hidden Files Mac OS X
To show hidden files on Mac, click on the Finder icon in the bottom Dock and then go to Applications > Utilities and then open Terminal application.
In the next step, type the command below, or just copy & paste it, and then press the Enter key.
defaults write com.apple.finder AppleShowAllFiles YES
Next, press and hold the “Option” key, and then right-click on the “Finder icon” in the bottom dock and select “Relaunch“.
This action will refresh the Finder and show all hidden files on Mac OS X. If you want to hide these files again, type the following command in Terminal:
defaults write com.apple.finder AppleShowAllFiles NO
If you can remember these commands, it’s very easy for you to show or hide hidden files. However, in case you can’t remember these commands, you will have to search for it on Google whenever you need to show or hide these files.
Show And Hide Hidden Files On Mac OS X With Terminal Aliases
What’s a Terminal alias? It’s a shortcut for one or more commands. By creating aliases for the show hidden files or hide hidden files commands, you only need to remember aliases, and then you can show or hide files quicker.
To create aliases, open Terminal and then type:
sudo nano ~/.bash_profile
It will ask you to provide the administrator’s password. Just enter your password and press the Enter key on your keyboard.
At the end of the .bash_profile file, just paste these code:
alias showFiles=’defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app’
And then:
alias hideFiles=’defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app’
In the next step, press Control + O (or Ctrl + O) and then press Enter to save the modification on the file.
Next, press Control + X (or Ctrl + X) to exit the editor to return to the Terminal window.
In the Terminal, type:
source ~/.bash_profile
to make two above aliases available.
In the next time when you want to show hidden files or hide hidden files, just type:
showFiles
or
hideFiles
in Terminal, respectively.
showFiles and hideFiles to Show or Hide Hidden Files Mac OS X
With these aliases, it will help you to speed up the show or hide hidden files process. You can also create aliases for long commands in Terminal to do any tasks quicker.
If you have any questions about this show hidden files Mac guide, feel free to ask me by leaving your comment below.