查看UUID
system_profiler SPUSBDataType | grep "Serial Number:.*" | sed s#".*Serial Number: "##
Mac虚拟地址修改
//查看所有网卡地址
networksetup -listallhardwareports
//修改 en1 网卡 输入 电脑密码 apple
echo 'apple' | sudo -S ifconfig en1 ether 00:00:00:00
//查看修改
ifconfig en1 | grep ether
显示隐藏系统文件 没错 AppleScript
//瞎写的 还能用
on run {input, parameters}
display alert "显示或隐藏系统文件?" buttons {"取消", "显示", "隐藏"}
set btnResult to button returned of result
if btnResult is "显示" then
tell application "Finder" to quit
tell application "System Events" to do shell script "defaults write com.apple.finder AppleShowAllFiles -bool true"
delay 1
tell application "Finder" to launch
else if btnResult is "隐藏" then
tell application "Finder" to quit
tell application "System Events" to do shell script "defaults write com.apple.finder AppleShowAllFiles -bool false"
delay 1
tell application "Finder" to launch
end if
return input
end run
允许位置来源
on run {input, parameters}
set passwordStr to (item 1 of input)
do shell script "echo " & passwordStr & " | sudo -S spctl --master-disable"
return input
end run