How to View Hidden Files on Mac
If you prefer to work by clicking, you can use the Finder app to show hidden files on macOS. Here's how it's done.
- Under Locations, click on your hard drive folder, probably named Macintosh HD.
- When you first open it you won't see much, so press Command Shift Period. You'll see a number of other files and folders that are slightly grayed out to mark them as hidden.
- Press the same key combination and these files and folders will disappear again.
This same key combination will work no matter which folder you have open in Finder.
How to Access the macOS Library Folder
Now, let’s say you just need to access your Mac’s Libraryfolder~/Library. You don't need to browse through all of your computer's folders to get there.
- In the top menu of Finder, click Go.
- Initially, you won't see the libraries listed at all. Hold down the Option key and a new Library option will appear. Click it and your Mac's ~/Library folder will open in a new Finder window.
How to Show Hidden Files on Mac Using Terminal
If you prefer working in Terminal, you can enable Show hidden files here. Just type the following commands:
defaults write com.apple.finder AppleShowAllFiles truekillall Finder
Once these commands run, a few things will happen. The Finder application will exit and restart on its own. You may see your desktop icons disappear and then reappear. Afterwards, you will be able to view all hidden files in Finder, as well as any temporary files saved on your desktop.
When you want to hide them again, you repeat these commands, replacing the value true
with false
.
defaults write com.apple.finder AppleShowAllFiles falsekillall Finder
Again, Finder will exit and restart. Those hidden files will be hidden from view again.
How to Hide Files on Mac Using Terminal
You might think this is more useful than doing everything in the Finder. However, Terminal can be great if you have files and folders on your Mac that aren't hidden but you want them to be.
To do this, here's what you need to do.
- OpenFinder to the directory containing the file you want to hide.
- In Terminal, type
chflags hidden
, followed by a space, but do not press Enter. - Drag the file or folder you want to hide from Finder to TerminalWindow.
- The file or folder name will appear at the end of the
chflags
command. - Now press Enter.
This will hide your file or folder from view. You can show it again using the terminal command above to make sure.
Quickly and temporarily display hidden files in Terminal
If you don't need or want to change how the Finder displays hidden files, you can list them in Terminal. You can do this using the command ls, list as appropriate.
- From Terminal, type
ls -a
- You will see all the files in the current directory, including hidden files and folders .
This is the -a flag that makes a difference here. It tells the list command to display all files. If you want to do this on a different folder, that's easy.
- From the terminal, type
ls -a ~/.config
- Just replace
~/.config
is the folder you want to view.
If you need to open this file or folder in the GUI, you can do so using the open command. Here is an example:
-
open .not_visible
will launch a file named .not_visible, assuming there is an application associated with it.
The same method also works for opening hidden folders in Finder.
-
open ~/.config
will open the hidden folder .config in a Finder window.
Be careful with hidden files
Remember, these files and folders are hidden for a good reason. If you accidentally delete or move folders or files that macOS depends on, it can cause some major problems. You may find yourself having to restore the operating system and then the remaining files and applications in Time Machine.
Please note that this does not mean don't try to use hidden files and folders. Just use your best judgment, err on the side of caution, and double-check what you're doing before you commit.
The above is the detailed content of How to show hidden files on Mac. For more information, please follow other related articles on the PHP Chinese website!

Telegram是一款跨平台的即时通讯软件,用户可以相互交换加密与自毁消息,发送照片、影片等所有类型文件;Telegram有加密聊天的功能,使用这种功能,聊天双方的内容完全保密,不会担心被监控或被第三方偷窥。官方提供Android、iOS、Windows、macOS、Linux和网页版等多种平台客户端;同时官方开放应用程序接口,有许多第三方的客户端可供选择 。

armoury crate是一款简易实用,功能全面的华硕系统控制软件;通过Armoury Crate平台,可以启动主页面上的系统性能模式调整、设置相关应用软件、获取系统信息,当机器连接支持的外设时,也可以使用Armoury Crate中所整合的Lighting、AURA Sync功能进行各种灯光特效的设定。

XRKit是为华为手机场景提供场景化、组件化的AR解决方案的框架软件,也就为华为相机,提供了虚拟模型在真实世界中的呈现。XRKit软件支持AR SDK,能与Unity3D引擎兼容,包括PTC Vuforia,ARKit,ARCore等。为AR呈现能力、人脸特效、光影特效;它属于华为XR生态的基础性软件。

推特(Twitter)是一个社交网络及微博客服务软件,是一家美国的公司;Twitter利用无线网络、有线网络、通信技术进行即时通讯,是微博客的典型应用,允许用户将自己的最新动态和想法以短信息的形式发送给手机和个性化网站群。

glance by mirametrix是一款眼球追踪软件;glance是由Mirametrix开发的应用程序,软件配合红外摄像头可识别用户脸和眼睛的方向,其中主要包括了状态检测、智能指针和窗口分屏三个功能。

ldplayer是一款多功能Android操作系统的模拟器,通过它可以直接在PC上运行Android智能手机游戏,是将家用PC或笔记本电脑转变为运行移动软件的游戏机的方法;ldplayer可以用来进行联网,用户可以和其他人一起开启联机对战。

rav endpoint protection是瑞星杀毒软件;RAV是“RisingAnti-virus”的缩写,是瑞星反病毒软件的意思,瑞星杀毒软件采用获得欧盟及中国专利的六项核心技术,形成全新软件内核代码,具有八大绝技和多种应用特性。

commercial service指的是商业服务软件;该软件主要为提供产品维修、系统升级、检测换机以及产品咨询等服务,服务的产品包括手机、电视、手表、耳机以及其他配件。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Zend Studio 13.0.1
Powerful PHP integrated development environment

Notepad++7.3.1
Easy-to-use and free code editor

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function
