Mac要在 Finder 中顯示隱藏文件
1太惠、在終端輸入:
defaults write com.apple.finder AppleShowAllFiles -bool true; KillAll Finder
這條命令可以顯示或隱藏文件文件夾(false)
2灭翔、使用Mac自帶APP“AppleScript”,新建文件鲤遥,然后復(fù)制下面這段代碼梯浪,編譯后會(huì)生成一個(gè)GUI的小程序混稽,可以實(shí)現(xiàn)文件或文件夾的顯示隱藏:
display dialog "隱藏/顯示隱藏文件" buttons {"可見", "隱藏"} with icon 2 with title "Switch to presentation mode" default button 1
set switch to button returned of result
if switch is "隱藏" then
do shell script "defaults write com.apple.finder AppleShowAllFiles -bool false;
KillAll Finder"
else
do shell script "defaults write com.apple.finder AppleShowAllFiles -bool true;
KillAll Finder"
end if
如圖: