Skip to content

Instantly share code, notes, and snippets.

@macmladen
Last active February 13, 2016 09:41
Show Gist options
  • Save macmladen/4368882 to your computer and use it in GitHub Desktop.
Save macmladen/4368882 to your computer and use it in GitHub Desktop.
Mac system maintenance
# Swap
sysctl vm.swapusage
# Many useful system information
sysctl -a
system_profiler
systemstats
# Wake and Sleep times on 10.9+
pmset -g log | grep " Wake "
pmset -g log | grep "Software Sleep "
# Change screenshot location and format
defaults write com.apple.screencapture location ~/Sites/_screenshots
defaults write com.apple.screencapture type pdf
killall SystemUIServer
# Reinitialize system without reinstall
# Boot into Single-User mode. Hold down Command-S on startup. And then type this:
# where <shortname> is the name of the existing user account.
mount -uw /
# This should be repeated for each user found in /Users
rm var/db/dslocal/nodes/Default/users/<shortname>.plist
rm -r /Users/<shortname>
# end repeat
rm var/db/.AppleSetupDone
reboot
# Mac bogomips:
sysctl -a | grep -i mwait.sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment