Reveal a file in Finder with open -R
The -R flag of the open command opens a Finder window with the target file selected and highlighted — the command-line equivalent of 'Reveal in Finder', even for paths Finder normally hides.
01Command
$ open -R ~/Library/Preferences/com.apple.dock.plist
open -R ~/Projects02What it does
Without -R, open launches the file in its default app; with it, Finder opens the parent folder and highlights the item instead. This is especially useful for deep library paths such as ~/Library that are cumbersome to navigate by hand, and it works on folders too (selecting the folder inside its parent).
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- open — open files and directories (macOS)Evidence: Documents the -R flag: reveal the file in Finder instead of opening it.
- Quickly locate a file or folder on MacEvidence: Covers locating items in Finder, the behavior that open -R automates.
Last verified: 2026-09-17 · Category: Files & Folders
06Related solutions
Make Finder display .pdf, .docx, .png and every other extension at all times.
Permanently reveal ~/Library — where app settings, caches and support files live.
Permanently display the full folder path at the bottom of every Finder window.