How to Hide or Unhide files and folders on Mac OS X

Like Windows and Linux OS X also has many hidden files on the device, and you can hide more. An average user never uses those hidden system files, or may be some do once in a blue moon. However, there are times when you want to view those folders and files, but Mac’s Show/View option isn’t like Windows that can unhide such files. In Such situation follow the steps below to see the hidden files.

How to show hidden files on Mac OS X (For all hidden files)

  • Launch Terminal (located under Launchpad –> Other –> Terminal OR Finder –> Applications –> Utility –> Terminal)
  • Copy and paste the following code in Terminal and Press Enter

defaults write AppleShowAllFiles YES; Killall Finder

It should look like the below screenshot

How to show Hidden Files on Mac

  • That’s it, now you can see hidden files on your Mac OS X

Some files can be seen by Show View Option. For example : If you are in Home Directory on your Mac, you can see folders like Desktop, Document, Download, Movies, Pictures etc., but Library is not there. You can right-click under finder (not on file/folder), click on Show View Option, and check the box of Show Library Folder.

These hidden folders can’t be modified or you cannot get inside, please follow the last instruction of the article to get access.

Now if you want to hide those files back, it can also be done.

How to hide secure system files that was hidden by default (Not for specific file or folder)

  • Launch Terminal on your Mac
  • Copy and paste the following command and press Enter

defaults write AppleShowAllFiles N0; Killall Finder

It will look like the below image

How to hide secure files on Mac

How to hide any specific file or folder on Mac

  • Launch Terminal
  • Type the following command

chflags hidden [Path of the file or folder]

  • If you are having difficulty typing the file path, you can simply drag a file or folder in terminal, and it will take the path itself. Just like the below screenshot where we have dragged a folder from Desktop to terminal, and the file disappeared as soon as we pressed Enter

Hide Fils or Photo

How to unhide hidden files (Specific file)

  • You can access hidden file by opening Finder, click on GO, and then click Go to Folder, and type the path

Access Hidden files from finder

  • You can type the following command to unhide any specific file or folder

chflags nohidden [Path of the file or folder]

  • You can also use the command we used earlier to show all hidden files (defaults write AppleShowAllFiles N0; Killall Finder). This command will show the file, but you won’t be able to get inside the folder or make any changes

How to access or or Modify hidden folders after making it visible

We have already learnt how to view hidden files or hide them on Mac OS X, but all the folders you unhide are disabled for access. Follow these steps to access them

  • right-click on folder that you just unhid
  • Select Folder Actions Setup
  • Now you will get many options. If you don’t know what to do with them, just click on Cancel
  • Now the folder you want to access will be listed there, check the box
  • Click on Show Folder, and now you are inside the folder, you can modify the files or even delete them if you want

Access hidden filesModify hidden files on Mac

Never miss an update: Get all new articles by Email. You can also join us on; Twitter | Google Circle | Facebook | FlipBoard