How to recover and show hidden files/folders on Mac - comprehensive tutorial 2020

By Vivian | Posted to Mac Data Recovery on July 12th, 2019 |

Summary: Can't see files on external hard drives or USB flash drives? Don't know how to show hidden files on Mac computers? Just read this page and find the hidden files on Mac computers quickly. Or if you can't locate certain disappeared files on your Mac computer, you can also use iBoysoft Mac Data Recovery to find them easily.

It is reasonable and convenient that macOS and Windows OS keep some files hidden by default. However, what if you need to show these hidden files for some reasons? For example, you manually hide some files on your Mac with "chflags hidden" command, keeping it from accidental deletion or stealthy look, but later you can't find these hidden files anymore. Or if you frequently work with WordPress, it is possible that you suddenly find your .htaccess files disappeared from the local version of the site on your Mac computer.

It would become a nuisance for users who encounter the same issue as the example below.

I just recently got my MacBook Pro with macOS Sierra and I noticed that I can't see certain files on my Mac. I'm really new to the macOS. I find that the Mac doesn't have a graphical user interface to show/hide hidden files like Windows (I was using PC before). So, I was wondering if there is any keyboard shortcut, script, or something like that to do this?

--from Stack Overflow

Then, is it possible to recover or show these hidden files in macOS?

Fortunately, the answer is quite delighting. And this page will comprehensively show you how to view and recover hidden/disappeared files on Mac computers.

Let's start with this tutorial cheat sheet!

Table of contents
1. Why your files are hidden by macOS?
2. How to show hidden files/folders through a keyboard shortcut?
3. How to show invisible files via the Finder?
4. How to show the invisible files on Mac with Terminal?
5. What is the best software to recover and show hidden files on Mac?
6. How to hide hidden files on Mac?
Bonus tip: How to make files/folders private and hide it?

Why your files are hidden by macOS?

macOS always makes some important files on the startup disk invisible since the release of macOS Sierra, and now it has developed into a separate read-only macOS volume in macOS 10.15 Catalina.

You must be wondering, why macOS doesn't let you see these hidden files?

Generally speaking, there are three reasons.

For security: The main reason is that the core system files need to be hidden so that your Mac can run correctly. It will protect these files from being damaged or deleted by users' improper operations. These hidden files include preferences, caches, logs and other service files of the installed apps and of the Mac operating system.

For tidiness: Another reason why some files are hidden is that if files on Mac are all visible to you, your computer and the desktop would appear like a mess. Therefore, files that are not used frequently are put out of sight.

For software bug: According to Wikipedia, files starting with a dot (someone may call it a period) and files with other "invisible" attributes will be hidden by macOS naturally. For example, the .trashes file, which contains files sent to the Trash before these files are deleted from Trash over the Mac system, is hidden by macOS. Other files like .htaccess file, ~/.bash_profile., and folders like /usr, /bin, and /etc are also tucked away out of sight.

show hidden files/folders on Mac

However, in some cases, you probably want to find the hidden files to troubleshoot apps' errors, to find some lost/disappeared files, or to clear the cache for more available spaces. Don't know how to spotlight these invisible files? Don't worry, the following part will go into details.

How to show hidden files/folders through a keyboard shortcut?

Actually, a keyboard shortcut is the easiest and the most efficient way to view hidden files on Mac computers, because all you need to do is to simply press some keys on your keyboard. Thus, if you are using macOS Sierra, macOS High Sierra, and above, you can find the invisible files and folders on your Mac with the following steps.

Step 1: Click the Finder icon at the dock of your Mac to open the Finder.

Step 2: In the left sidebar, click the folder or hard drive where you want to show the hidden files.

Step 3: Press Command + Shift + . key combinations.

shortcut to show hidden files/folders on Mac

Then, you will see a treasure trove of files and folders that appear as grayed out in the right column. That indicates the hidden files are showing up.

show hidden files/folders in the Finder on Mac

Besides macOS volume, this method can also be used to show hidden files on external hard drives, USB flash drives, and view hidden files on SD cards. Nevertheless, if your Documents folder is missing in the Finder, you need to manually enable it in System Preference as this article introduced. Or, if your external drive is not showing up in Mac Finder, you can check the setup in the Finder Preferences.

How to show invisible folders via the Finder?

The Finder is the default file manager and graphical user interface shell used on macOS. It is responsible for all applications, files, disks, and network volumes, etc. So, if you want to recover some autosaved Microsoft Word documents files or view invisible folders like the ~/Library folder, you can do it via the Finder.

Step 1: Open the Finder on your Mac.

Step 2: Click Go at the upper left of your desktop and press Option (It would be Alt in some keyboards), you will see the cloaked Library folder.

Step 3: With Option hold, you can click on the Library folder and check if you can find the desired files.

Alternatively, you can also do the following to see and access the contents of the ~/Library folder.

Step 1: Open the Finder on your Mac.

Step 2: Click Go at the upper left of your desktop.

Step 3: Choose Go to Folder (or press Shift + Command + G) in the context menu.

Step 4: Type ~/Library into the box and click Go.

Didn't locate the files that you want with the methods mentioned above? Well, let's move forward to the next method.

How to show the invisible files on Mac with Terminal?

Also, some Mac computer geeks and experienced users may be asking, "Can I show hidden files with the command line?"

Of course, you can do it. There is a built-in utility called Terminal in macOS, which lets you control your computer system through command prompt. Thus, if you are familiar with the command line, let's get down to it.

Warning: If you are not a command line genius but you want to try this, make sure what you type in the command prompt is exactly the same with what is written below. Or else, you are likely to screw it up.

Step 1: Click the Launchpad on the dock of your computer and choose Other.

Step 2: Find Terminal and then open it.

Step 3: Type in defaults write com.apple.finder AppleShowAllFiles TRUE and hit Enter. You will see nothing different by now.

Step 4: Type in killall Finder to refresh the Finder and the desktop.

find the invisible files on Mac with Terminal

After a few seconds, the hidden files will show in the Finder.

What is the best software to recover and show hidden files on Mac?

It is possible that these operations are too complicated for you and you'd like show hidden files without Terminal, or you didn't find the files you are expected to see with the methods above. Under this circumstance, you can also recover and view the hidden files with an app called iBoysoft Mac Data Recovery on your Mac.

iBoysoft Mac Data Recovery is one of the best Mac data recovery software to recover hidden and deleted files on Mac. With this tool, you can recover disappeared files from external hard drives, SD cards, USB flash drives, and Mac internal hard drives, etc. Moreover, you can use this app to recover lost files from formatted, corrupted, unreadable, and unmountable drives on Mac. It is fully compatible with macOS 10.15 (Catalina), 10.14 (Mojave), macOS 10.13 (High Sierra), macOS 10.12 (Sierra) and Mac OS X 10.11 (El Capitan), 10.10 (Yosemite), 10.9 (Mavericks), 10.8 (Mountain Lion), 10.7 (Lion).

To find and recover hidden photos, documents, movies, and other files on your Mac, just follow the tutorial below.

Step 1: Download, install, and launch iBoysoft Mac Data Recovery on your computer.

Step 2: Select the drives that contain the hidden files and click on "Next". This will scan for all lost and invisible files on this drive.

recover hidden files on Mac

Step 3: Once the scanning process is finished, you can spotlight the files that you want according to their file types.

Step 4: Select files that you want to recover and then click "Recover" to get them back.

How to hide hidden files on Mac?

After seeing and editing these files, you may want to hide these hidden files again. After all, they're related to the security of your macOS.

Wondering how to do this? Just check the solutions below.

Solution 1:Hide hidden files on Mac with a shortcut

If you have shown the hidden files in Finder with a keyboard shortcut, vice versa, you can also hide them again. To do this, just press Command + Shift + Period once more.

Solution 2:Hide hidden files with Terminal

Similarly, if you show them with a command line previously, you can also make these files invisible with Terminal still. Simply type in the command line below.

Step 1: Open Terminal.

Step 2: Type defaults write com.apple.finder AppleShowAllFiles FALSE in the command prompt and hit Enter.

Step 3: Type in killall Finder to refresh the Finder as you did before.

Bonus tip: how to make files/folders private and hide it?

Probably, you have some private files or folders that you don't want other people to access. For instance, you stay up to work on a document or design, definitely, you don't want others to plagiarize yours works.

Then, is there any trick that you can hide these files on your Mac computer?

Shhh! The answer is Yes, and you should not tell anybody else.

Step 1: Open Terminal as you did before.

Step 2: Type in chflags hidden and press Space.

Step 3: Drag files or folders you want to hide into the Terminal window.

Tips: It will display the file path in Terminal windows, and you'd better record this path so that you can unhide this file when you need it.

Step 4: Press Enter to ensure this operation. You will see your files disappear from the Finder.

Step 5: After the dollar sign, you need to type in defaults write com.apple.finder AppleShowAllFiles FALSE this time and then press Enter.

Step 6: Type in killall Finder to restart the Finder.

That's it. As easy as turning your hand over, right?

Wrap-ups:

It doesn't matter if you want to show the hidden files just out of curiosity or to troubleshoot some issues on your Mac. The aforementioned solutions should be helpful to locate these files. But compared with the complicated command lines, iBoysoft Mac Data Recovery definitely is the easiest and risk-free method to find the missing files on Mac computers.

Vivian

Vivian likes to share technical tips and solutions with people, especially in macOS and Windows data recovery and disk repair tricks. Being a part of @iBoysoft, she has solved many computing and technological problems for readers with ease.