MacOS

MacOS

系统

Finder 显示和隐藏文件

显示Mac隐藏文件的命令:defaults write com.apple.finder AppleShowAllFiles -bool true
隐藏Mac隐藏文件的命令:defaults write com.apple.finder AppleShowAllFiles -bool false
或者
显示Mac隐藏文件的命令:defaults write com.apple.finder AppleShowAllFiles  YES
隐藏Mac隐藏文件的命令:defaults write com.apple.finder AppleShowAllFiles  NO
输完单击Enter键,退出终端,重新启动Finder就可以了
重启Finder:鼠标单击窗口左上角的苹果标志-->强制退出-->Finder-->重新启动

Finder 快速显示和隐藏隐藏文件

command + shift + .

Finder 显示系统盘

Finder——偏好设置——边栏——(下方)系统盘    勾选
这样就会显示了,默认是不显示的

Finder 显示目录全路径

# 显示
defaults write com.apple.finder _FXShowPosixPathInTitle -bool TRUE
killall Finder

# 隐藏
defaults delete com.apple.finder _FXShowPosixPathInTitle
killall Finder

默认打开方式

第一步:右键单击该文件,然后选择「显示简介」选项。
第二步:找到「打开方式」项目,点击倒三角选择你想指定的默认应用程序。
第三步:单击「全部更改」按钮即可生效。

常用目录

应用程序安装目录:
/Applications

应用程序存档数据位置:
/Users/$(whoami)/Library/Application\ Support
/Users/chenqy/Library/Application Support

常用软件

文本编辑器 coteditor

App Store 可下载

Royal TSX

/Applications/Royal\ TSX.app
/Users/chenqy/Library/Application\ Support/Royal\ TSX

Chrome

cd /Applications/Google\ Chrome.app/Contents/MacOS
mv Google\ Chrome Google\ Chrome.real

# 保存mhtml文件
vi Google\ Chrome
#!/bin/bash
"`dirname "$0"`"/Google\ Chrome.real --save-page-as-mhtml $@

chmod u+x Google\ Chrome

#!/bin/bash
"`dirname "$0"`"/Google\ Chrome.real --save-page-as-mhtml --allow-running-insecure-content --enable-easy-off-store-extension-install --disable-gpu --disable-software-rasterizer --disable-new-menu-style --allow-outdated-plugins --disable-background-networking --disable-infobars --test-type --ignore-certificate-errors $@
Google Chrome    94.0.4606.54 (正式版本) (arm64)
修订版本    c8191a1d5cccbf64e8fe7269043f8ace8d74dd05-refs/branch-heads/4606@{#1130}
操作系统    macOS 版本11.4(版号20F71)
JavaScript    V8 9.4.146.16
用户代理    Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.54 Safari/537.36
命令行    /Applications/Google Chrome.app/Contents/MacOS/Google Chrome --flag-switches-begin --flag-switches-end
可执行文件路径    /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
个人资料路径    /Users/chenqy/Library/Application Support/Google/Chrome/Default

命令行    /Applications/Google Chrome.app/Contents/MacOS/Google Chrome.real --save-page-as-mhtml --flag-switches-begin --flag-switches-end

BCompareOSX-4.4.0.25886 授权

cd /Applications/Beyond\ Compare.app/Contents/MacOS/
mv BCompare BCompare.real
vi BCompare

#!/bin/bash
rm "/Users/$(whoami)/Library/Application Support/Beyond Compare/registry.dat"
"`dirname "$0"`"/BCompare.real $@

chmod u+x BCompare

Parallels Desktop 启动虚拟机

Parallels Desktop过期后无法运行虚拟机,可以使用prlcrl后台启动虚拟机

終端指令:prlctl start '系統名称'
例如:prlctl start 'Windows 10'