0%

osx

1. 收费但好用的工具

edraw 画图工具
screentflow 录屏工具
mousepose 鼠标/键盘点击提示工具

2. 更新 bash

  1. brew install bash
  2. 重启, 按 Cmd + R, csrutil disable
  3. 重启
  4. sudo sh -c "echo '/usr/local/bin/bash' >> /etc/shells"
  5. sudo mv /bin/bash /bin/bash.origin
  6. sudo ln -s /usr/local/bin/bash /bin/bash
  7. 重启, 按 Cmd + R csrutil enable

3. 实用命令

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 使用caffeinate阻止Mac运行屏幕保护和睡眠
caffeinate -t 3600

# 不通过App Store更新OS X
sudo softwareupdate -i -a

# 将所有下载过的文件列出来
sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* 'select LSQuarantineDataURLString from LSQuarantineEvent' |more

# 使用chflags命令隐藏文件或文件夹
# 如果你想让某个文件或文件夹影藏, 那么chflags命令可以实现.
你只需将文件路径填对即可, 比如我们向隐藏桌面上的macx文件夹.
如果你想再次看到文件夹, 只需将hidden改为nohidden即可.

chflags hidden ~/Desktop/macx

# 命令行剪切板
echo haha | pbcopy
pbpaste > ha.txt

4. 快捷键

opt + esc 阅读已选中内容
ctrl + cmd + d 翻译

5. FAQ

6. OSX 10.15 上 crontab 定时任务无法生效

1
2
3
4
5
# https://www.d3tt.com/view/109
which cron
# /usr/sbin/cron

# 将 cron 拖到 /系统偏好设置/安全性与隐私/完全磁盘经济访问权限中

7. Resource