由于蘋果系統的finder未在UI上提供顯示隐藏檔案選項,是以得通過如下兩種方法進行設定。
1. 指令行方式
在控制台中輸入如下指令可以使finder顯示隐藏檔案。
defaults write ~/Library/Preferences/com.apple.finder AppleShowAllFiles -bool true
下面的指令關閉顯示隐藏檔案人狀态。
defaults write ~/Library/Preferences/com.apple.finder AppleShowAllFiles -bool false
2. 直接編輯屬性
在finder中找到如下目錄
Users/yourname/Library/Preferences
再找到com.apple.finder.plist檔案,用屬性編輯器打開(xcode帶的),如下圖
找到AppleShowAllFiles項,改變後面的屬性即可。