How to show hidden files mac. How to show hidden folders and files in Mac OS - Aviation and Computer Notes

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 executing the command `ls -la` 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 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 a 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 both in the Finder and in open file dialogs 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 the following AppleScript statements in its window

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 find your new program in Finder and run it: it will automatically change the file display mode to the opposite. 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 Mac OS environment, it becomes especially relevant. However, there are several pitfalls in his solution, which we will deal with.

The essence of the problem

The fact is that in Mac OS it is not so easy to make hidden files and folders visible,

since the standard "System Preferences" tools in Finder do not provide this option. However, there is no need to despair. The question is how to display on Mac? has two main answers. You can use the terminal or the FinderToggleHiddenFiles program, which is based on Automator.

Using the terminal

Launch a terminal window. To do this, open “Programs”, then “Utilities” and “Terminal”. In the window that appears, enter the following couple of lines of text (use a space instead of square brackets ""):
defaultswritecom.apple.finderAppleShowAllFilesTRUE
killallFinder

Next, press “enter”. After this procedure, open windows in the Finder will close and immediately open again. Thus, the question of how to display hidden folders in the Mac OS universe will be resolved. However, this is not all, since there is also

reverse command. To prevent Mac OS from being displayed anymore, enter the following text into the terminal (then press "enter"):

defaultswritecom.apple.finderAppleShowAllFilesFALSE
killallFinder.

Automator

To use the second method to solve the problem, download the FinderToggleHiddenFiles application to your computer and install it on the Mac operating system. From the moment this is done, it will be possible to activate or disable the required function by launching the program.

Other Mac OS Features

So, we have dealt with the main question of how to display hidden folders,

however, the operating system has a number of other features that not everyone knows about. Some of these functions cannot be left out due to their particular usefulness.

You can create a folder with the required content. Imagine that you have a certain number of files scattered all over your desktop, but you want to collect them into a single directory. If we talk about the traditional path, you will have to do everything manually: first create a folder, then select objects, excluding the folder icon itself, and finally transfer the contents to the directory.

However, it allows you to select all the necessary files, click on the right mouse button and in the menu that appears, use the provided creation option with the specified content.

Another feature of the system is the ability to merge folders. This way you can automatically combine the contents of two folders. Apple officially introduced this feature, but it was up to users to figure out how to use it themselves.

Let's say you have two folders named the same and they are located in different directories. You can move them to a single directory, after which the usual one will appear asking for a replacement, but if these folders of the same name have different objects, another dialog box will appear, but it will have an additional option - merging. By selecting this function, you will receive a single folder, which will be filled with the contents of both originals.

By default, hidden folders and files are not displayed in the Mac OS operating system. In principle, they are not needed most often by users, and not every Mac grower may need them, and certainly not every day.

There are several options for displaying hidden folders and files on a MAC:

  • Look once, after closing the folder and returning to it, hidden files will again become invisible;
  • Enable permanent display of hidden folders and files;
  • Use a third-party application to control the display of hidden objects on Mac OS.



Let's consider all three options:

1. You can quickly check a certain folder for hidden objects using a keyboard shortcut CMD + SHIFT + .(Command + Shift + period), and you can use both left and right CMD and SHIFT.

2. You can enable permanent display of hidden folders and files using a command executed through the console (terminal).

  • Open the Terminal program, paste from the clipboard or manually write the line:

defaults write com.apple.finder AppleShowAllFiles YES

  • Press Enter key
  • Press the " key" Option"on the keyboard and right-click on the Finder icon and select the line" Restart"

In order to return the settings to the original ones, you need to run the following command in the terminal:

defaults write com.apple.finder AppleShowAllFiles NO

(similar to the previous one, only at the end there is NO instead of YES)

You can also restart Finder (or restart your Mac) for the settings to take effect.

3. By installing a free application Funter, can be with a slight movement of the hand With a quick click of the mouse, you can turn on and off the display of hidden files and folders on your Mac. After installation, the Funter application will hang in the system tray (at the top menu bar) and allow you to quickly show and hide hidden files and folders again.

This method, on the one hand, is convenient and the simplest, but, on the other hand, installing an additional application - wasting system resources on it and relying on the integrity of the developer is not very attractive.

Conclusion: The best option to view hidden files and folders on Mac OS is the first one - using keyboard shortcuts CMD + SHIFT + .(Command + Shift + period).



How to make a file or folder hidden on Mac OS?

Unfortunately, as in OS Windows, you cannot check the box to make the file hidden in Mac OS. Here you can’t do without the command line (without a terminal). So:

1. Register the Terminal application.

2. Write a command

chflags hidden

Next, separated by a space, you need to specify the path to the file that needs to be hidden. In order not to have to worry about specifying the correct path manually, use the “DRAG-AND-DROP” technology - grab the file with the mouse, drag it onto the Terminal program window and release. The correct path will be added automatically, after which the command will look, for example, like this:

chflags hidden /Users/user/Desktop/777/1.txt

Execute the command by pressing the Enter key. As a result, the 1.txt file located in a folder named 777 on the Desktop will become hidden.

How to make a hidden file or folder on Mac OS not hidden?

Similar to the previous example, using the Terminal program, write and execute the command:

chflags no hidden /Users/user/Desktop/777/1.txt

Difference: NOhidden instead of hidden.

Probably everyone knows that files or folders on a computer can be hidden. In Windows, all you have to do is open the file properties and make it hidden. On macOS you can also hide files and folders, but this is done in a slightly different way. This is what we will discuss in today’s article.

In contact with

Modern versions of macOS (macOS 10.12 and above) offer a quick and easy way to show hidden files and folders (see below for how to make them hidden) using a keyboard shortcut. A simple key press will instantly show hidden files and hide them again. This is currently the fastest way to show "invisible" files on Mac.

Typically, invisible files on a Mac are system files and folders, configuration data, or other files and folders that are hidden from ordinary users for some reason. These folders are typically used by more advanced users who need to view, edit, or change the folder or its contents.

1. From Finder, navigate to any folder that may contain hidden files (for example, the Macintosh HD root folder or your Home folder).

2. Click ⌘Cmd + ⇧Shift + Period to show hidden files.

How this works using a Macintosh HD example is shown below.

As you can see, when you press the above key combination, all the hidden content in the folder will be displayed. Hidden files can be easily identified by their slightly faded names and icons. It is worth noting that when displaying files, hidden files in all folders on the Mac will become visible, just as in the case of using the corresponding commands.

The main difference between modern releases and earlier versions of macOS is that the new editions offer a method to show hidden content using a combination of ⌘Cmd + ⇧Shift + Period, whereas previously for this purpose you had to enter commands in the terminal (instructions below). But if you like to do things the old-fashioned way, modern versions of macOS also support this method.

How to hide hidden files on Mac using keyboard shortcuts

In Finder, open any folder and click ⌘Cmd + ⇧Shift + Period to hide files. After this action, all invisible folders on the Mac will be hidden again. For information on how to make any files and folders hidden, see below.

Remember that pressing the combination ⌘Cmd + ⇧Shift + Period in the file system will show or hide invisible folders. This is what a folder with hidden files looks like:

After clicking ⌘Cmd + ⇧Shift + Period hidden files will appear in the folder. Visually they will look paler:

In modern versions of macOS, the combination functionality ⌘Cmd + ⇧Shift + Period has become somewhat wider and now allows you to display folders and files in the Finder.

As mentioned above, you can display or hide hidden content using Terminal commands, but why do this if new versions of the Apple operating system offer a faster and more convenient method?

In any case, if you are not sure what you are doing, do not delete or change hidden files under any circumstances, as many of them are configuration files for various functions, programs and applications.

How to assign the “hidden” attribute to a file or folder

The free Funter app allows you to find hidden files via an icon in the Finder menu and toolbar. The Finder panel icon appears when the integration is activated (enabled by default).

To make files or folders hidden in the Finder, right-click on them or click on the Funder button in the Finder panel and select the option from the menu that opens "Hide with Funter".

Note: If the “Show Hidden Files” mode is activated in the Finder (see below), then hidden files and folders will be visible.

How to turn off showing hidden files and folders

To turn off the display of hidden files and folders, click on the Funter icon in the macOS menu bar and select the switch "Show Hidden Files" to position Turned off.

How to Show Hidden Files and Folders on Mac

To enable the display of hidden files and folders, click on the Funter icon in the macOS menu bar and select the switch "Show Hidden Files" to position Included.

How to remove the "hidden" attribute from a file or folder

To make hidden files or folders not hidden in the Finder, right-click on them (or the Funder button in the Finder panel) and select the option from the menu that opens "Unhide with Funter".

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. Finder and other Mac apps will not show this file or folder by default.

Hide a folder or file

Instead of hiding an individual file (although you can do that), 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

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 - non-hidden ones.

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