How to Hide and Show Hidden Files, Folders on macOS
7.0/7 rating 1 vote

How to Hide and Show Hidden Files, Folders on macOS

In contrast to Microsoft Windows, by default, the macOS hides system files to make sure that Mac newbies do not get in the way with the inner operations of a Mac. There is a wonderfully reasonable description for that.

If you look for yourself wanting to get access to hidden files on Mac OS X, such as a .htaccess file which you got from your Hosting or VPS, a .bash_profile, a . DS_Store... you can certainly perform the below command through the terminal to make hidden files become apparent with Mac (Mac OS X 10.7, 10.8, 10.9 and 10.10 Yosemite, El Capitan and macOS Sierra).

How to Hide Files and View Hidden Files by using Terminal

TerminalNote
Show Hidden Files or Foldersdefaults write com.apple.finder AppleShowAllFiles YES
killall Finder
Press Return after each line
Hide Hidden Files or Foldersdefaults write com.apple.finder AppleShowAllFiles NO
killall Finder
Press Return after each line
Hide a File or Folderchflags hidden [...][...] = The path of the file or folder
Unhide a File or Folderchflags nohidden [...][...] = The path of the file or folder

The Terminal is the most effective method to show hidden files or folders in Mac OS X. The Terminal application allows you to manage Mac OS X working with the command lines to get in Unix commands.

How to show Hidden Files in the Finder

Here is easy way to launch a Terminal window and use the following commands line in it, just hit Return button after each line:

Step 1: Open the Terminal

Open the Finder and then click Go >> Utilities. A new window appears, you can see the Terminal and double click on it.

how to hide show files mac 2

how to hide show files mac 3

 

Or you also go to LaunchPad >> Find the Other >> Click on Terminal.

how to hide show files mac 3

Step 2: Copy and Paste the command lines into Terminal

In a moment, you can copy and paste the two lines listed here into Terminal separately, and hit Return after each line:

defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder

The first line, when you press Return, nothing occurs yet simply because you have to relaunch the Finder for the adjustments to work.

how to hide show files mac 5

The last line, you'll find the Finder quits and then relaunches itself quite fast with the in the result.

If the last line doesn't work, you are able to also relaunch the Finder by pressing and holding Option + Control and clicking on the Finder icon in the Dock, then click on Relaunch.

how to hide show files mac 6

Launch Finder through clicking on its icon in the Dock. You are going to view the hidden files are now apparent. Hidden files are displayed with lighter words. It's like image below:

how to hide show files mac 7

Step 3: Exit the Terminal program

This can be exited by selecting "Quit Terminal" from the Terminal menu or also use Command + Q to exit.

How to Hide hidden files in the Finder again in Mac

Step 1: Open the Terminal

Step 2: If you want to get hidden files again, you are able to simply use the same command but write NO by the end or type the following command line below.

defaults write com.apple.finder AppleShowAllFiles NO
killall Finder

how to hide show files mac 8

The hidden files will be certainly reverted.

how to hide show files mac 9

Ways to manage individual hidden files or folders

Hiding a File or Folder

The simplest method to multiple hidden files that change a unique attribute on the file known as a Finder flag. You are able to easily set a file, folder as hidden using the "chflags" command line in the Terminal.

The first, open the Terminal and type the following command line:

chflags hidden

Make sure to type a space after "hidden".

hidden files folders 1

Then Drop and Drag the wanted file or folder to the Terminal window. Hit Return to run the command.

hidden files folders 1

This is going to set the file as hidden.

Opening a Hidden Files or Folder

To access the hidden file from the Finder, you can click the Go menu in the Finder and select Go to Folder.

Put the path of the file into the dialog box and click Go or press Enter. The ~ means your user directory, so if you had already a directory named like HiddenFolder on your Document, you just enter: ~/Desktop/HiddenFolder.

Open the folder which was hidden recently at Desktop

hidden files folders 1

Open the folder which was hidden recently at Disk

hidden files folders 1

Note: If you don't make sure the path of folder or file, you can open the Terminal and drag the folder into it. Then, you can see the path immediately.

Unhiding a File or Folder

In shorts, copy and paste the following command into the terminal, including a space in the end.

chflags nohidden

If you keep in mind the correct path of the folder or file, you are able to type it inside the terminal. If you really don't make sure, you can certainly use the above tip to show hidden files and folder in the Finder and then drag the hidden file or folder into the Terminal.

hidden files folders 1

Hit Enter later and the file or folder will come to be unhidden, so you are able to open it as normal.

Tricks: You are able to press the up and down arrow button at the terminal to get with commands recently.


Author

Solomen
Solomen

Solomen is Editor of OMG!Howto who covers technology news, how-to guides and more. Solomen uses an iOS and Android devices as well as Mac and Windows. In his free time, he often listens to Baroque music and goes swimming. Follow him on Instagram: @solomen1992

comment

Comments (2)

  • Asya Karapetyan

    Asya Karapetyan

    24 October 2016 at 14:52 | #

    There is an easier way to show hidden files, hide or unhide them - use a free app Funter - https://nektony.com/products/funter

    reply

  • bernard

    bernard

    03 December 2016 at 20:36 | #

    doesn't work -- using 10.12.1

    bc tried several times including cd'ing to /

    reply

Leave a comment

You are commenting as guest.

About Website

OMG!HOWTO is a technology website where we cover the latest from Apple, Facebook, Microsoft and Tips & Tricks. We seek to present fresh news, useful tips, tutorials, applications that the modern technology user will appreciate. OMGHOWTO.COM is powered by Joomla.

0
Shares
0
Shares