Skip to content

macOS 相关命令

常用命令

shell
ssh-keygen -t rsa -C "youremail@example.com"

清理DNS缓存

shell
sudo killall -HUP mDNSResponder
sudo dscacheutil -flushcache

TimeMachine本地快照查询及删除

shell
sudo tmutil listlocalsnapshots /
sudo tmutil thinLocalSnapshots / 100000000000 4

显示和隐藏隐藏文件,运行完毕强行退出终端.

shell
defaults write com.apple.finder AppleShowAllFiles -bool true
defaults write com.apple.finder AppleShowAllFiles -bool false
defaults write com.apple.finder AppleShowAllFiles  YES
defaults write com.apple.finder AppleShowAllFiles  NO

修改默认截图格式

shell
defaults write com.apple.screencapture type jpg

macOS QQ 聊天记录

~/Library/Containers/com.tencent.qq/Data/Library/Application Support/QQ/