How to show hidden files and folders in Mac OS. How to show hidden files on Mac OS How to show hidden folders mac

How to show hidden files and folders in Mac OS. How to show hidden files on Mac OS How to show hidden folders mac

Every modern operating system aimed at the mass user has hidden files. This is necessary so that the user does not accidentally delete system files, and also so that they do not distract his attention when searching for the desired application, image, document and other files on the disk.

Mac OS is no exception. Apple's desktop operating system also has folders and files that are hidden from users by default. In this article, we will look at how to view hidden files in Mac OS in several ways.

Table of contents:

Using hotkeys to view hidden files

The easiest way to view hidden files and folders on Mac OS is to use a keyboard shortcut. Apple Company implemented it into the operating system above Mac versions OS Sierra. If you have an older version of the system, then this method will not work for you, and you need to use one of the options described below.

Keyboard shortcut for viewing hidden files and folders in Mac OS: “Shift+commnad+>”.

This combination allows you to both display previously hidden elements and make them invisible again.

Using Terminal to View Hidden Mac OS Files

This is some kind of analogue command line on Mac OS. Through it you can perform various actions that are not available simply from the operating system settings. You can use one of the “Terminal” commands to enable the display of hidden files in the operating system, and disable the other.

To see the hidden Mac files OS via “Terminal”:


After this, you will notice that previously hidden files and folders appear in the Finder. If this does not happen, restart your computer or force quit the Finder application to completely restart it - this can be done through the “Task Manager”.

Once the above command is used, all hidden files and folders will always be visible. To make them invisible again, use the command in “Terminal”:

Defaults write com.apple.Finder AppleShowAllFiles NO

After you restart your computer or Finder, the folders and files will become hidden again.

Creating a script to view hidden files in Mac OS

The Mac OS operating system has a utility called “Script Editor”. It allows you to quickly execute certain commands. To create a script you need to have a little programming knowledge, but in this case we will provide detailed instructions, what needs to be done for the script to execute the command to show or hide files and folders on Mac OS:


As a result of saving, a separate application will appear, when launched, the corresponding script will be triggered.

Funter is a program for viewing hidden files and folders

If you want to use one of ready-made solutions, which allow you to view hidden files and folders, rather than creating your own script, you can use the Funter application. It is distributed free of charge on the developers' website. This program extremely simple and easy to use. What is important is that the application consumes virtually no computer resources.

To use Funter, you need to download and install it. After that in top line menu, a corresponding icon will appear, when you click on it, you can turn on or off the display of hidden files and folders by clicking on the switch “Show Hidden Files”.

It is worth noting that the Funter application is, among other things, convenient to use for hiding current files and folders. To do this, in Finder you need to click right click mouse on any object, then select the “Hide with Funter” option to set the “Hide” attribute for it.

Option 1

Using the program Terminal You can enable or disable the display of system and hidden files and folders in MAC OS X

Launch the Terminal program (located in Applications/Utilities/ or search for it using spotlight)

enter the command into the terminal window (the defaults write command makes changes to the settings files):

Defaults write com.apple.finder AppleShowAllFiles -bool true

press "enter". This command will change Finder settings. For them to take effect, you need to restart the Finder process with the command:

Killall Finder

press enter.
Hidden files will now show up in Finder.
If after work you need to hide them, this is done with the same command, but with the false parameter

Defaults write com.apple.finder AppleShowAllFiles -bool false

And restart Finder again

Killall Finder

Option 2

If you have to work with hidden files quite regularly, you can use AppleScript to avoid opening the terminal. For this it is necessary to Open the AppleScript program and input the code in the editor window:

Set dialogResult to display dialog "Show hidden files..." buttons ("YES", "NO") copy the dialogResult as list to (buttonpressed) if buttonpressed = "YES" then do shell script "defaults write com.apple.finder AppleShowAllFiles -bool true" else do shell script "defaults write com.apple.finder AppleShowAllFiles -bool false" end if do shell script "killall Finder"

Then click the "Compile" button. And then save as application app or as a script, the app can be inserted into the dock or desktop.
If in the “save” mode it is not possible to choose in what form to save this script for displaying hidden files, you can use the “export” command in the file menu.

Option 3

Changing the visibility flag of an individual file. It is especially convenient for managing individual files, for example .htaccess (it does not always work; I will write about this file separately).
In the terminal, go to the folder with the file and execute the command

Chflags nohiddenFileName

Instead of the file name, the folder name can be used, for example the command:

Chflags nohidden ~/Library

Will make the hidden library folder visible, respectively the command

How to make a file or folder invisible (hidden) in OS X

This action is done by the same command chflags, but is used as a flag (sign) hidden , For example:

Chflags hidden ~/Library

Sets the flag for a hidden folder in Mac OS X. In this case, it is the Library located in the user's folder

macOS has the ability to hide folders and files, just like other operating systems. But macOS hides these options and does not allow you to do this as easily as on Windows or Linux. To hide a file or folder, you will have to set the “hidden” attribute for it. Finder and others Mac apps will not display this file or folder by default.

Hide a folder or file

Instead of hiding separate file(although you can do that too), you can create a hidden folder. For the example we'll do this, this trick will also work to hide individual files.

Firstly, open a terminal window – Press Ctrl + Space, write Terminal and press Enter. In a terminal, enter the following command, including the space at the end of it:

Chflags hidden

Drag the folder into the terminal window

The path to the file or folder will appear in the terminal. Press Enter to run the command and the file or folder will disappear. Finder won't show it by default.

Access hidden files or folders

How to access a hidden folder from Finder? The easiest way is to click on the menu Go in Finder and select Go to folder.


Type the folder path in the dialog box and press Go or Enter. ~ Means a custom folder, so if you have a folder named SecretStuff on your desktop, you'll need to enter ~/Desktop/SecretStuff. If this were in the documents, you need to enter ~/Documents/SecretStuff. Don't worry about the fact that the folder is hidden and won't show up normally in Finder, you can quickly access it from this path. Any files you store in this folder are effectively hidden and no one can accidentally see them, but they will appear in the Finder if you navigate to this directory in the manner described.

Show hidden files and folders in Open/Dialog

The enable option is graphical - you must enable it using a Terminal command and restart Finder for the changes to take effect. To view hidden files in Finder, open a Terminal window and run the following commands in it, pressing ENTER after each one:

Defaults write com.apple.finder AppleShowAllFiles TRUE killall Finder

This command tells Finder to show hidden files and then launches it. This will show all hidden files and folders. They appear partially transparent to distinguish hidden files and folders from regular ones that are not hidden.

Want Finder to stop showing hidden files and folders? Run the following command to disable this option and restart Finder:

Defaults write com.apple.finder AppleShowAllFiles FALSE killall Finder

Make files or folders visible

Do you want files or folders to be displayed? Run the same command as before, just change “hidden” to “nohidden.” In other words, enter the following command in the terminal, followed by a space:

Chflags no hidden

If you remember the exact path to the file or folder, you can enter it into the terminal. If you don't remember, you can use the above trick to show hidden files and folders in Finder and drag the hidden file or folder into the Terminal as you did before.

(You can also press the up arrow key in the terminal and get the command you entered earlier. Use the left arrow key to navigate to “hidden” and change it to “nohidden”, then press Enter.)

You can also hide files or folders by renaming them so that the name begins with “.”. However, Mac OS X won't let you rename files and folders from the Finder window, so you'll have to do it from the Terminal.

Don't miss Apple news - subscribe to our Telegram channel, as well as YouTube channel.

You've probably noticed more than once that you can't see hidden files in the Finder on your Mac. It doesn’t matter which operating system is installed on your computer - Mac OS, Windows or Linux, each of them has its own hidden folders and files, and creates new ones in the process.

If in the same Windows it is enough to check the box in the settings to show them, then enable showing hidden files in Mac OS a little more complicated. But after reading our instructions, viewing hidden files and folders on Mac will not be any problem for you. So, how do you enable hidden files on Mac OS? Very simple!

UPDATE: If you have Mac OS Sierra or later, just use the keyboard shortcut "shift+cmd+.".

If this doesn't work, then you are using Mac OS El Capitan or higher old version OS X, then the instructions below will help you.

Typically, hidden folders and files are system ones and are necessary for the normal functioning of the computer’s operating system, that is, they should not be changed or deleted. However, there are exceptions everywhere, and sometimes you need to access a file that you don’t even see in the Finder, for example.htaccess for webmasters. All files whose names begin with a dot are hidden by default in Mac OS.

Some hidden files and folders are needed for the operation of the OS, and some are created by the operating system to speed up the processing and delivery of information to the user - they store information about how to display a particular folder and sort the files in it; reduced copies of photos (thumbs) for quick rendering, etc.

If for some reason you need to show hidden files in the Finder, here's an easy way to do it through the Terminal on Mac OS.

1. Open the Terminal program

First you need to open the program "Terminal", which is installed by default on every computer running Mac OS. To do this, in the Dock panel (the panel with programs, which is usually located at the bottom of the screen), open Finder (always the leftmost icon) and select “Programs” from the menu on the left. In the list of installed programs that appears, find the program "Terminal.app" and run it (there are other ways).

By the way, open any installed program can be done in a much simpler way - click the buttons Ctrl + space and start typing the program name in the pop-up window. Doing this is much faster than searching the right application in the programs folder.

2. Turn on showing hidden files and folders

This item will be the last one if you only need to show hidden files and folders in Mac OS and leave everything like that. To do this, copy the following code

defaults write com.apple.Finder AppleShowAllFiles YES

and paste it into the previously opened Terminal window using the keyboard shortcut cmd+V and press Enter. We recently talked about how to copy and paste text on Mac OS.

If you want to make one specific file/folder hidden, or vice versa, open, it will help you.

Attention! Be careful when changing or deleting hidden files - they are hidden from the average user for a reason. Most of them affect performance Mac systems OS, so you should only change them if you are sure of what you are doing and why.

After working with MacOS X for some time, you may at some point discover that the system is hiding something from you. You can notice this either by specifically executing the `ls -la` command in the terminal, or by connecting some removable storage medium (flash, hdd) that you worked with from MacOS X to another system (for example, MS Windows) - you probably You will be surprised that there are many more files and folders than you expected to see.

If you've been working with computers for a long time, you know that OS They often hide from the user's eyes service information that they need for their work, but is useless for the one who works with the system. In the case of MacOS X, this applies to directory and application configuration files, files deleted to the Recycle Bin, Spotlight indexing data, and a number of other files. The rule also applies that any file whose name has a dot (.) as the first character is hidden.

But what if you still need to see hidden files? For example, in text editor do you need to change the instructions in the .htaccess file (this file may contain some behavioral settings for the Apache web server)? I can offer 3 ways to solve this issue.

Option 1 - Terminal.app
, then copy the command there

defaults write com.apple.Finder AppleShowAllFiles 1 && killall Finder

You will now be able to see hidden files in both Finder and dialog boxes opening files in various applications.
To hide the files again, paste the line into the terminal

defaults write com.apple.Finder AppleShowAllFiles 0 && killall Finder

Option 2 - write a small utility
Open the Script Editor (Script Editor.app) and place it in its window following instructions AppleScript

set vis to do shell script "defaults read com.apple.Finder AppleShowAllFiles"
if vis = "0" then
do shell script "defaults write com.apple.Finder AppleShowAllFiles 1"
else
do shell script "defaults write com.apple.Finder AppleShowAllFiles 0"
end if
tell application "Finder" to quit
delay 1
tell application "Finder" to activate

After this, save the file as a Program (first come up with a name) in some directory (you must leave all program parameters unselected). Now search in Finder for your new program and run it: it will automatically change the file display mode to the opposite one. Those. if you have disabled the display of hidden files, the program will enable it; and vice versa.

Option 3 - download a ready-made solution
I have already completed the steps from the second method I proposed, and here you can download the resulting utility reVisible.app

Save this file anywhere convenient for you and run it whenever necessary.

In the future, I will try to post all such utilities immediately in compiled form.