macOS 預設隱藏以 . 開頭的檔案與資料夾(如 .htaccess, .git, .DS_Store)。以下提供三種方式顯示/隱藏它們:
defaults write com.apple.finder AppleShowAllFiles TRUEkillall Finder欲隱藏:將 TRUE 改為 FALSE 再 killall Finder。
~/Library/Preferences/com.apple.finder.plist,雙擊開啟。AppleShowAllFiles,Type 選 Boolean,Value 勾選 True。在 Finder 中按 Command+Shift+.(句點)即可即時切換隱藏檔案顯示/隱藏,無需指令、無需重啟 Finder。
終端機 cd /路徑/到/資料夾 → ls -a 列出所有檔案(含隱藏)。