Finder hidden files and folders. Show hidden files. Creating a script to view hidden files in Mac OS

By creating MAC OS, Apple tried to protect the average user from unnecessary settings and installations. And everything would be fine, but in the pursuit of minimalism, Apple hid from more experienced users and quite popular control “levers”. As it turns out, MAC OS is not always simpler and more intuitive than Windows, and in some matters even the opposite. In this article I will show you how to show/hide hidden files in MAC OS. Well, as you like, I give you two different ways to solve the problem for your choice.

As you probably already guessed, just go to Finder settings and you will not be able to activate the mode for displaying hidden files in MAC OS, since there is no such switch in principle. But don’t despair, there are plenty of solution options.

Show/Hide hidden files in MAC OS via Terminal

IN this method we will introduce UNIX commands in the application window Terminal. At first glance, it may seem that you have delved into a place where the average user should not go at all, but I assure you that all the commands given below have been tested by me personally.

To display hidden files in MAC OS, do this:

Step 1 Open the application Terminal from Finder - Applications - Utilities

Step 2 Copy and paste into Terminal the following line:

defaults write com.apple.finder AppleShowAllFiles YES

Step 3 Press Enter button

Step 4 While holding down the Option/Alt button, click right click By Finder icon in the dock, then click " Restart»

As a result of the executed command, all hidden files and folders will be displayed in MAC OS. In order to “hide” hidden files in MAC OS, you need to follow the same steps as above, but in the second paragraph you should enter another command:

defaults write com.apple.finder AppleShowAllFiles NO

This method, although not complicated and quick to execute, requires that you keep at hand (or remember by heart) UNIX commands to enter into the Terminal. This is a little inconvenient if you often need to show/hide hidden files. To automate this process, use the second method.

Show/hide hidden files in two clicks

If you need to show/hide hidden files in MAC OS often and in large quantities, then your an indispensable assistant will become miniature FREE app Funter, from the nektony development team. After installation, this application settles in top line menu, after which working with hidden files is reduced to two clicks.

In my opinion, Funter is a great solution for showing hidden files. At the same time, the application practically does not consume the resources of your computer and does not force you to remember long command lines by heart. With Funter, you can also install or uninstall directly in the Finder window. attribute "hidden" for files and folders.

I am confident that the methods I have described will solve the problem of showing hidden files in MAC OS for most users. Remember that hidden files were hidden from your eyes by default for a reason. If you are going to make any settings/changes in system hidden files, be extremely careful.

Mac OS has the ability to hide folders and files, just like other operating systems. But Mac OS X 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. 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 the terminal, enter next command including the space at the end of this:
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 custom folder, so if you have a folder named SecretStuff on your desktop, you 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

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
Do visible files or folders

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 nohidden

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 starts with “.”. However, Mac OS X will not allow you to rename files and folders from Finder windows, so you'll have to do it from the terminal.

Score 1 Score 2 Score 3 Score 4 Score 5

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 running the `ls -la` command in the terminal, or by connecting some removable media information (flash, hdd) that you worked with from MacOS X to another system (for example, MS Windows) - you will probably be surprised that there are much more files and folders than you expected to see.

If you've been working with computers for a long time, you know that operating systems often hide from the user's eyes service information that they need to work, but is useless to the person working 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
Open a terminal, 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.

Every modern operating system aimed at 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 specified 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 run force termination Finder apps To restart it completely, you can do this 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 little programming knowledge, but in this case we will bring detailed instructions, what needs to be done for the script to execute the command to show or hide files and folders in Mac OS:


As a result of saving, it will appear separate application, 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 this, a corresponding icon will appear in the top menu bar, 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 also convenient to use for hiding current files and folders. To do this, in the Finder you need to right-click on any object, and then select the “Hide with Funter” option to set the “Hide” attribute for it.

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 show 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.

Usually hidden folders and files are system ones and are needed for normal functioning operating system of the computer, that is, you should not change or delete them. 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 OS to work, and some are created 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 under Mac control OS. To do this in Dock panels(the program panel, 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 much more is possible in a simple way- press 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.