How to reveal hidden files on Mac?

Enable temporary and permanent hidden files showing on Mac computers

The Mac computer operating system hides many files and folders within storage - i.e., files are not visible to the user. These are usually system level items, configuration data and other files, most of which are stored within the system library folder. Apple decided that these files should not be visible for all users due to possible issues if the data was modified without proper knowledge. If you have downloaded a file with a name that contains a dot (.), you may be unable to find it, since it will be recognized as a 'hidden' file.

There may be cases when you need to access hidden data to solve certain issues. Additionally, adding a dot (.) at the beginning of a filename is an easy way to hide files within your computer. Fortunately, Apple have attached a keyboard shortcut to modern versions of the operating system. This hides or reveals files within specific folders. Furthermore, there are a number of methods to control visibility of hidden data permanently for all folders on your Mac computer. In this article, we describe how to reveal hidden data within one folder or the entire storage, including both temporary and permanent methods.

introduciton

Table of Contents:

Reveal hidden files on macOS by using keyboard shortcut

Together with macOS version 10.2 Sierra, Apple released a function to immediately hide or reveal hidden files. To reveal hidden data, launch Finder and go to any folder in which you believe there are hidden files or folders. For example, the Macintosh HD root directory or user home folder. Press the combination of Command, Shift and Dot (.) to reveal the hidden data. Files and folders will immediately appear with slightly faded names and icons (this separates hidden files from regular ones). This method will impact all folders within the computer storage, however it is only a temporary measure, on restarting the system, the data will be hidden once again. To hide these files again, use the same keyboard shortcut. If you wish to reveal hidden files permanently, follow the method below.

finder-hidden-files

[Back to Table of Contents]

Enable hidden files showing on all versions of Mac operating system

To reveal hidden files permanently on your Mac, you must change the default setting by using a specific command in Mac's built-in command line window called Terminal. To begin, launch the Terminal application by invoking Spotlight, use the keyboard shortcut of Command and Space, type in Terminal, and then press Return. Alternatively, you can launch Finder and go to the Applications folder, then open Utilities folder and launch the Terminal app. Once the command line window appears, type the following command. Note: choose the correct command depending on the Mac operating system version your computer is running. To reveal hidden files permanently on macOS High Sierra 10.13, MacOS Sierra 10.12, OS X El Capitan 10.11, Yosemite 10.10, and OS X Mavericks 10.9 use the following command:

  • defaults write com.apple.finder AppleShowAllFiles TRUE;killall Finder

To reveal hidden files on Mac OS X 10.8 Mountain Lion, OS X 10.7 Lion, Mac OS X 10.6 Snow Leopard, type the following command into Terminal and press Return.

  • defaults write com.apple.Finder AppleShowAllFiles TRUE;killall finder

enable-hidden-files-showing

After executing the command, Finder will quit due to the killall command. This is necessary for the changes to take effect. From this point, hidden files will be visible through Finder, however they will be displayed with slightly faded names and icons to separate hidden files from regular ones. This is a permanently method - the hidden files will be displayed until preferences are overwritten.

finder-hidden-files

Viewing numerous system files can be confusing. Therefore, if you do not need to modify these hidden files repeatedly, consider hiding them again. Hiding files is as simple as revealing them. To enable hidden files, launch Terminal, type the following command and press Return to execute it.

  • defaults write com.apple.finder AppleShowAllFiles FALSE;killall Finder

disable-hidden-files-showing

Alternatively, if this command does not work, try to execute separate commands. First type the default write command as shown below and press Return.

  • defaults write com.apple.finder AppleShowAllFiles FALSE

Then, type the killall command to quit Finder completely.

  • kilall Finder

[Back to Table of Contents]

Enable hidden files showing temporarily

Using Mac's built-in command line, there are many useful functions, including 'list' and associated parameter 'all'. Executing this command with parameter will display all files within the specified folder.

  • ls -a

The above is the list command assigned with the 'all' parameter, however, to use its full functionality, you need to declare a path to the directory of files you wish to reveal. For example, type the command listed below to display all files and folders that are stored within the Desktop folder.

  • ls -a ~/Desktop

list-all-files

This method will not affect Finder or any other method by which you can browse your file system (hidden files will be only listed within the Terminal window). Additionally, consider about using the 'open' command in Terminal to launch hidden files. An example of open command use:

  • open ~/Desktop/.invisible_by_default.txt

This will open the specified file with the associated application by file type. For example, if the file type is text, TextEdit app will launch and open the specified file. In this way, you can also open hidden directories through Finder - just type the 'open' command and then the path to the directory. For example:

  • open ~/.invfolder

Executing this command will open the hidden folder from the user's home directory via the Finder window.

Video Showing how to reveal hidden files on Mac

[Back to Top]