Files

Hidden files (.env, .gitignore, .zshrc) are completely invisible in Finder

You're looking for your .zshrc or .env file in Finder and it's just not there. You know the file exists because your terminal can see it, but Finder acts like it doesn't exist. Drives developers absolutely nuts the first time it happens.


Why does this happen?

macOS treats any file starting with a dot as a hidden file, and Finder respects that by not showing them. It's a decades-old Unix convention to hide config files from regular users — but genuinely inconvenient for developers.


How to fix it

1

Quick toggle in Finder: press ⌘+Shift+. (period) to show/hide hidden files.

2

To make it permanent via Terminal: run defaults write com.apple.finder AppleShowAllFiles YES then killall Finder.

3

To revert: run the same command with NO instead of YES.



Discussion

登入僅用於識別留言,不會儲存個人資料

你可能也遇過