For Mac

How to View Hidden Files and Folders On Your Mac With Terminal

Like Windows, macOS also has secret files that are hidden so that a user doesn’t meddle with it but sometimes you need to access the hidden files.

If you want to tweak a setting to perform a troubleshooting step (like finding a log or deleting a preference file), you need to make some changes in those hidden files. Some of you also want to get rid of the files from the hidden folder as they take way too much space.

So the question is “how to access the hidden files?”

Well, we have a solution for it.  With the help of terminal and simple command, you can get your Mac’s hidden files and folders.

In this article, we have discussed how to view hidden files and folders on Mac with Terminal.

Launch Terminal

  1. You can launch Terminal via Spotlight.

  1. You can also locate Terminal:

View Hidden Files and Folders:

“defaults write com.apple.finder AppleShowAllFiles TRUE” (This command tells the Finder to show all files, irrespective of the hidden flag setting )

“killall Finder” (This command will stop and restart Finder, so that the changes can take place)

Note: It is normal to see the Desktop screen  vanish and reappear while executing the commands.

Once these commands are executed, you will be able to see a file named.DS_Store. The .DS_Store file consists of information about the folder, you are currently in, including the icon, the location of the window and other bits of information the system requires. Moreover, you get the access to the important hidden folders such as the Library folder inside your Home folder. The Library folder contains many files and folders which is related to a particular apps and services that you use on your Mac.

Note: It is recommended to take a good look at your  Library folder and target the issue that you are having, then make any changes.

Hide The Files:

Now that you have seen the hidden folders or you are done with the troubleshooting, you must hide the folders to keep them safe.

“defaults write com.apple.finder AppleShowAllFiles FALSE?”

“killall Finder”

Press return key or enter key to execute the command and done, the hidden files are hidden once again.

In this way, you can hide and show the hidden folders of Mac with the help of Terminal. Try it and let us know what worked for you.

Watch this space for cool tech tips!

Leave a comment