Terminal Hacks - Show Hidden Files and Folders

The macOS operating system hides files and folders for good reason: to prevent accidental deletion of critical system files and to simplify the OS so that only the files and folders we need to interact with are visible. There may be times, however, when you need to locate a hidden file or folder.

LECTROHACK #1 Terminal Hacks: Show Hidden Files and Folders artwork.
LECTROHACK #1 Terminal Hacks: Show Hidden Files and Folders artwork.

To Show

  • Open Terminal: Finder > Applications > Utilities

In Terminal, type or paste the following…

defaults write com.apple.finder AppleShowAllFiles YES

(return)

  • Hold down the control + options keys together, left-click on the Finder icon and click Relaunch.

To Hide

  • Open Terminal: Finder > Applications > Utilities

In Terminal, type or paste the following…

defaults write com.apple.finder AppleShowAllFiles NO

(return)

  • Hold down the control + options keys together, left-click on the Finder icon and click Relaunch.

Originally posted 30 August, 2021.