[关闭]
@guhuizaifeiyang 2018-08-26T15:33:48.000000Z 字数 1166 阅读 835

未分类


Mac Tips

  1. sudo periodic daily
  2. sudo periodic weekly
  3. sudo periodic monthly

Mac Commands

caffeinate

keep your computer from sleeping

examples:

Keep your computer awake for 1 hour:

  1. caffeinate -t 3600 &

The -t argument is based on seconds, so an hour is 60 * 60 (3600). Note that you can still sleep your computer manually when caffeinate is running.

Keep your computer from idling until a Terminal command finishes

  1. caffeinate -i long_running_script.sh

-i prevents “idle sleeping.” Other options include:

-d just prevents the display from sleeping
-m just prevents disks from sleeping when idle
-s keeps the whole system awake

Wake up your computer

  1. caffeinate -u -t 1

-u replicates user activity. It causes the same reaction as moving a mouse or hitting a key after your Mac sleeps.

Alfred script

  1. (caffeinate -t "$(({query}))") && pmset sleepnow

终端中打开文档管理器

  1. open .
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注