❌

Reading view

How to Show Hidden Files on Mac With or Without Terminal

You can show hidden files on Mac with a simple keyboard shortcut. You do not need Terminal, an administrator password, or advanced technical knowledge for the most common method.

macOS hides some files because they contain settings, app information, or system resources that people do not normally need to open. These items remain on the Mac, but Finder does not display them during regular use.

You may need to see them when following troubleshooting instructions, opening the hidden Library folder, managing website files, checking app settings, or finding data left behind by an uninstalled application. Once the files are visible, you should avoid deleting anything unless you understand its purpose.

Show Hidden Files Without Terminal

Finder has a built-in shortcut that reveals hidden files and folders instantly. It is the fastest method when you only need temporary access.

To show hidden files in the current Finder folder:

Finder > Open Any Folder > Command + Shift + Period (.)

The period is the regular full-stop key on the keyboard. You must press Command, Shift, and Period at the same time.

The folder will update immediately. Hidden items normally appear lighter or more transparent than regular files. This visual difference helps you recognize files that macOS does not usually display.

The shortcut works in most Finder locations, including the user’s Home folder and some folders on external drives. It can also work inside the Open and Save windows presented by Mac applications.

If you do not see any changes, try the shortcut inside your Home folder. The available hidden items depend on the apps and services used on the Mac.

To open your Home folder:

Finder > Go > Home

After the Home folder opens, use the hidden-file shortcut again. You may see items with names that begin with a period, including configuration folders created by applications.

Files beginning with a period are commonly called dot files. macOS and Unix-based applications use them to store settings and other information without filling normal folders with technical data.

The Finder shortcut acts as a visibility switch. Using it a second time conceals the files again.

To hide the files after you finish:

Finder > Open Any Folder > Command + Shift + Period (.)

Hiding the files does not delete them. Finder simply returns to its normal view.

A dark-themed Mac Finder window displays files and folders in the 76BPPrimary directory, with a blue gradient background and an Apple logo in the bottom right corner. The view also hints at advanced customization options commonly accessed through Mac Terminal commands, such as the ability to show hidden files within the Finder.
Image Credit: AppleMagazine

Open the Hidden Library Folder

The user Library is one of the most frequently accessed hidden folders on a Mac. It stores app preferences, browser information, caches, containers, saved states, Mail resources, and other data connected to the signed-in account.

You can open the Library directly without making every hidden file visible.

To open your personal Library folder:

Finder > Go > Press and Hold Option > Library

The Library option appears in the Go menu while you hold the Option key. Select Library before releasing the key.

This method opens the Library belonging to the current user. Its path is ~/Library, where the tilde represents the user’s Home folder.

The user Library is different from the Library folder located at the top level of the startup disk. The top-level folder contains resources that can be shared by different accounts, while ~/Library primarily contains information for the current account.

Deleting content from the Library can reset an app or remove locally stored information. If troubleshooting instructions tell you to remove a file, confirm its name and location before making any changes.

Open a Specific Hidden Folder

Finder includes a Go to Folder feature for opening locations that are difficult to find manually. It is useful when you know the folder’s exact path and do not want to reveal every hidden item.

To open the Go to Folder field:

Finder > Go > Go to Folder

You can also reach the same field with a keyboard shortcut.

To open Go to Folder from the keyboard:

Finder > Shift + Command + G

A small field will appear. Type or paste the path of the location you want to open, then press Return.

To open your personal Library:

Go to Folder > Enter ~/Library > Press Return

To open the hidden SSH folder in your Home folder:

Go to Folder > Enter ~/.ssh > Press Return

The .ssh folder stores information used by Secure Shell tools. It may not exist if SSH software has never created it on the Mac. Finder displaying an error for this path does not necessarily indicate a problem.

To open the Library shared by all users:

Go to Folder > Enter /Library > Press Return

Pay attention to the beginning of each path. ~/Library opens the Library inside the current user’s Home folder. /Library opens the shared Library at the top level of the startup disk.

You can also paste a longer path supplied by an app developer or support technician. Check the spelling carefully because similarly named folders may contain completely different data.

A dark-themed Mac Finder window on a Mac shows files in a folder called β€œBGs,” displaying image filenames, their sizes, types, and modification dates, with an Apple logo watermark at the bottom right. If you want to see even more details or show hidden files in this view, you can easily use Mac Terminal commands for extra control.
Image Credit: AppleMagazine

Show Hidden Files With Terminal

Terminal can change Finder’s hidden-file preference so concealed items remain visible until you change the setting again. This option is helpful during longer troubleshooting or development sessions.

Terminal is included with macOS and can be opened from the Utilities folder.

To open Terminal:

Finder > Applications > Utilities > Terminal

A Terminal window will appear with a text prompt. Enter the command exactly as presented and press Return.

To keep hidden files visible in Finder:

defaults write com.apple.finder AppleShowAllFiles -bool true && killall Finder

Finder will close briefly and reopen. This restart allows the new visibility preference to take effect.

The command does not change the files themselves. It tells Finder to display items that macOS normally conceals.

You can reverse the change at any time.

To hide the files in Finder again:

defaults write com.apple.finder AppleShowAllFiles -bool false && killall Finder

Finder will restart once more and return to its regular view.

If Finder does not behave as expected after changing the preference, you can remove the custom value. macOS will then use its default behavior.

To remove the custom hidden-file preference:

defaults delete com.apple.finder AppleShowAllFiles && killall Finder

Terminal may say that the preference does not exist if no custom value is stored. That message simply means there is no setting to remove.

See Hidden Files Only in Terminal

Terminal can list hidden files without making them appear in Finder. This can be helpful when checking whether a file exists while leaving Finder unchanged.

The ls command displays the contents of a folder. Adding -a includes hidden items, while -l displays details such as permissions, ownership, file size, and modification date.

To list visible and hidden items in your Home folder:

ls -la ~

The results appear inside Terminal. Names beginning with a period are hidden during normal Finder use.

To list the contents of the folder currently open in Terminal:

ls -la

These commands only display information. They do not delete or modify the files shown in the results.

Work Safely With Hidden Mac Files

A hidden file is not automatically unnecessary, suspicious, or safe to delete. macOS and installed applications conceal many items to protect settings and reduce clutter.

The .DS_Store file, for example, can store Finder display information for a folder. External drives may include folders such as .Trashes and .Spotlight-V100, which macOS uses for Trash and Spotlight features.

Removing the wrong item can reset an application, delete local information, interrupt syncing, or cause macOS to rebuild a database. Copy an item to a safe location before changing it when troubleshooting instructions require manual file work.

Some system folders remain protected even when Finder displays them. Showing hidden files does not bypass administrator permissions or System Integrity Protection. There is no need to disable Mac security features simply to view a hidden folder.

Applications can also contain internal resources. These files are stored inside an app bundle and are different from standard hidden files.

To view the internal contents of an application:

Finder > Applications > Control-click the App > Show Package Contents

Changing files inside an app bundle can prevent the application from opening. If you need one of its resources, copy that file elsewhere instead of editing the original.

When you finish working, return Finder to its regular view to reduce the chance of accidentally moving or deleting a configuration file.

To hide all revealed files with the Finder shortcut:

Finder > Open Any Folder > Command + Shift + Period (.)

Β 

The post How to Show Hidden Files on Mac With or Without Terminal appeared first on AppleMagazine.

  •  

Pasting Quoted Paths and Escaped Terminal Text

Anthony Reimer:

When you are shell scripting or working in Terminal, sometimes you want a quicker way to enter the path to a file or folder, particularly if you have already navigated to it in the Finder. One way that works in Terminal is to drag the file or folder from the Finder onto the Terminal window, which then types the path into the current command. However, another method was introduced in El Capitan (OS X 10.11) that allows you to copy the full path onto the clipboard.

In Finder, you can hold down Option and choose Edit β€£ Copy Pathname.

Starting in macOS Sequoia, copying the path to the clipboard using the method described generates a path that can be directly pasted into the Terminal or a script and be interpreted as that path without further manipulation.

It adds single quotes and or escapes characters, but only if necessary.

There are certainly some people who are unhappy with this change in behaviour but most Mac Admins will not be among them.

You can get the unescaped path via AppleScript.

Anthony Reimer (via Miles Wolbe):

Graham Pugh pointed out that if you have text on the clipboard, you have the option of pasting that text β€œescaped” in Terminal. Simply copy the text from whatever source you choose (e.g., the output of an AutoPkg run, where paths are not escaped), then in Terminal choose Edit > Pasted Escaped Text or use the shortcut Command-Control-V.

[…]

As a bonus, this concept can be applied to a tip I learned from Armin Briegel a few years ago, namely that if you select something in Terminal that you want to then paste into the current shell command, you can skip the copy-paste dance and instead just press Command-Shift-V to do it in one step (or if you prefer menus, Edit > Paste Selection). If you add the Control key to that sequence, the text pasted is escaped (Edit > Paste Escaped Selection or Command-Control-Shift-V).

  •  
❌