Mac显示隐藏文件

Mac要在 Finder 中显示隐藏文件

1、在终端输入:

defaults write com.apple.finder AppleShowAllFiles -bool true; KillAll Finder

这条命令可以显示或隐藏文件文件夹(false)

2、使用Mac自带APP“AppleScript”,新建文件,然后复制下面这段代码,编译后会生成一个GUI的小程序,可以实现文件或文件夹的显示隐藏:

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

如图:


Mac显示隐藏文件_第1张图片

你可能感兴趣的:(Mac显示隐藏文件)