Can't see a file on your Mac? Reveal hidden files
You know a file is there — an app saved it, a colleague sent it, Terminal lists it — but Finder shows an empty folder. Most of the time the file isn't lost; it's hidden. macOS quietly conceals certain files, and one keyboard shortcut, Cmd+Shift+., brings them back. First, here's why a file goes invisible, so you fix the right thing.
Reveal hidden files in one keystroke
Before diagnosing anything, try the fast fix. In the folder where the file should be, press Cmd+Shift+. (Command-Shift-Period). Any hidden files appear, dimmed. If yours shows up, that's your answer — it was hidden. Press the shortcut again to tuck them away once you've done what you needed.
If you'd rather keep hidden files showing while you sort this out, set it in Terminal:
# Show hidden files in Finder
defaults write com.apple.finder AppleShowAllFiles -bool true
killall Finder
# Reverse it later
defaults write com.apple.finder AppleShowAllFiles -bool false
killall Finder
Why the file was invisible
A file can drop out of Finder's view for a few distinct reasons — knowing which one you're facing tells you whether the shortcut is enough:
- Its name starts with a dot. Files like
.envor.configare hidden by the Unix convention macOS follows. The Cmd+Shift+. toggle reveals these. - It has the "hidden" flag set. A file with an ordinary name can still be flagged invisible — often by an installer or a script. The toggle shows it too, but to unhide it for good you clear the flag (below).
- It's inside a hidden folder. The file is visible, but its parent folder isn't — common with
~/Libraryand dot-folders. Revealing hidden items exposes the whole path. - It's not really missing — it's a view or search quirk. A folder set to a filtered view, or a Finder search scoped to the wrong location, can look empty when the file is fine.
Permanently unhide a flagged file
If the file has the hidden flag rather than a dot name, showing hidden files works for now, but the file vanishes again the moment you toggle them off. To make it a normal, always-visible file, clear the flag in Terminal:
# Check whether the hidden flag is set (look for "hidden")
ls -lO ~/Documents/yourfile
# Clear it so the file is always visible
chflags nohidden ~/Documents/yourfile
Drag the file from Finder into the Terminal window after typing chflags nohidden to fill in its exact path without typos. This works identically on macOS 13 Ventura, 14 Sonoma, and 15 Sequoia.
Still can't find it? Confirm it exists
If nothing appears even with hidden files on, make sure you're looking in the right place. Press Cmd+Shift+G in Finder and paste the file's full path to jump straight to it — if Finder can't open the path, the file genuinely isn't there and this is a recovery question, not a visibility one. A quick ls -la in Terminal on the folder is the definitive check: if the file is listed there, it exists and is simply hidden.
Mainspring turns "show hidden files" into a labelled toggle — flip it on to hunt down a missing file, flip it off to keep Finder clean. It's one of 90+ hidden macOS settings it makes reversible in a click.
Try Mainspring free →Signed & notarized by Apple · 1-day free trial · $29 once
Jump straight to any path
Finder's Go to Folder box is the fastest way to confirm a file's location when it's playing hide and seek. Our guide to using Go to Folder in Finder covers path shortcuts that make tracking down files second nature.