Finder and files
Hidden files and file extensions
Reveal hidden items when needed and keep file extensions visible enough to understand what a file really is.
8 minute lesson
Files whose names begin with a dot are hidden by Unix convention. Development tools use them for configuration, including .git, .env, and .ssh.
Press Command-Shift-. in Finder to show or hide hidden items. In Terminal, use:
ls -la
Hidden does not mean protected. A hidden file can still be read by an application or another user with permission. Secrets need correct access controls and must stay out of repositories, screenshots, and shared archives.
Show filename extensions
An extension such as .jpg, .txt, or .js helps macOS and applications identify a file. Finder can hide extensions, which makes names such as these easy to confuse:
invoice.pdf
invoice.pdf.command
config.json.txt
Enable Finder → Settings → Advanced → Show all filename extensions when you work with source files or downloaded artifacts.
Changing an extension does not convert the file. Renaming photo.png to photo.jpg changes only the name. Use Preview or another application to export the actual format.
Inspect before opening
Select a downloaded file and press Command-I to view Get Info. Check its full name, kind, source, and opening application.
Do not reveal hidden files and then delete unfamiliar dotfiles to “clean” your Mac. A shell, editor, Git repository, or application may depend on them.
Try this: create notes.txt, hide its extension in Get Info, then enable all extensions in Finder. Observe which setting wins and restore the file afterward.
Lesson completed