Mac下显示隐藏所有文件

显示Mac隐藏文件的命令:defaults write com.apple.finder AppleShowAllFiles -bool true
隐藏Mac隐藏文件的命令:defaults write com.apple.finder AppleShowAllFiles -bool false

脚本

tell application "Finder" to quittrydo shell script "defaults read com.apple.finder AppleShowAllFiles"set OnOff to resulton errorset OnOff to "0"end tryif OnOff = "0" thenset OnOffCommand to "defaults write com.apple.finder AppleShowAllFiles 1"elseset OnOffCommand to "defaults write com.apple.finder AppleShowAllFiles 0"end ifdo shell script OnOffCommanddelay 1tell application "Finder" to launch

复制代码保存为*.scpt, 双击后选择运行就ok!

原文地址:https://www.cnblogs.com/heri/p/4392416.html