Created
August 24, 2014 18:13
-
-
Save aasmith/aaaaf718eec1815e2887 to your computer and use it in GitHub Desktop.
Power down with a one-time forced hibernate in OS X
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Before using this script, see output of pmset -g and note the value | |
# of hibernatemode. | |
pmset -g | |
# Save to disk, per pmset(1): | |
# | |
# hibernatemode = 25 (binary 0001 1001) is only settable via pmset. The | |
# system will store a copy of memory to persistent storage (the disk), and | |
# will remove power to memory. The system will restore from disk image. | |
sudo pmset -a hibernatemode 25 | |
# Power down right now. | |
sudo pmset sleepnow | |
# Back to normal for desktops (use whatever pmset -g was set to earlier) | |
sudo pmset -a hibernatemode 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment