How to view hidden files in MacOS

On Mac, as in most existing operating systems, many of its important or necessary files for proper functioning are hidden and in reality this is not an impediment for anyone, but it is uncomfortable when we find the solution to this problem. on a website, but we do not take into account that on certain occasions it is a half-solution.

For example, one of the results that the browser gave me had the answer, but it was a half-answer, because it showed me a command line but did not show how to complete the action of restarting the Mac explorer, that is, Finder.

Shortly after, I found a simple solution to this small detail, which I will describe in detail so that we can all learn step by step and in the most practical way possible.

Hidden files on Mac are characterized by their names, that is, we commonly find these files on our computer with names such as: .DS_store or .localize, among others.

let's see:

This is the Documents folder on a Mac, you can clearly see that it contains two folders, one called Img_Pant and another called utorrent, I put them there as an example.

Now, we open a terminal:

We can easily access the terminal in the following way:

We go to our Dock and select Launchpad

A magnifying glass will appear there which identifies a search box, we write terminal and the terminal icon will appear

We click and it will immediately open.

The next step is to give the order to our computer to show us the files that I have hidden.

We type the following command:

defaults write com.apple.finder AppleShowAllFiles TRUE

And we press enter, it will seem like nothing happened, but in reality our machine performed the process internally.

After this, we go to the Dock or toolbar and go to the Finder, which is the Mac Explorer.

We stand on the icon,

We hold down the alt key, right-click on the Finder icon and select Force Restart; as we see below:

After this, the system restarts Finder to update the Mac explorer and will immediately show us the hidden files and/or folders on the computer.
 
In this case, as I mentioned before, we are located in the Documents folder, where we can now see the hidden files that are there.
 
It was actually easy, the problem is that many times the information is half-baked and really incorrect.
Now to return them to their hidden state, the same process is carried out, changing a single word in the terminal, like this: 
We write the same command that we executed the first time but instead of TRUE we write FALSE, that is:
 
defaults write com.apple.finder AppleShowAllFiles FALSE and press enter.
 
 
We restart Finder again, after this process and if you did it correctly, the hidden folders will be there once again.
 

As you can see, Mac is not that complicated to learn. What happens is that since we are focused on a single configuration, we do not realize that what is difficult is learning the configuration of other types of operating systems.

Thanks to these small experiences, we can advance a little further by learning new and simple techniques that we will later share with those who begin a process like this, referring to the change from Linux to Mac environment.

 

By: Cesar Duran

Drupal Jr Developer

Seed EM