Created
January 13, 2016 09:26
-
-
Save jnyryan/a900c580e9144b735cf3 to your computer and use it in GitHub Desktop.
Some command line tips and tricks for OSX
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
| #!/bin/bash | |
| #If spotlight is using up tons of CPU and slowing your comp down (MDS process), turn on/off spotlight. | |
| alias spotlight_off="sudo mdutil -a -i off" | |
| alias spotlight_on="sudo mdutil -a -i on" | |
| #Turn on/off local time machine backups (local backups being extra storage when your backup drive is not connected. | |
| alias tm_local_off="sudo tmutil disablelocal" | |
| alias tm_local_on="sudo tmutil enablelocal” | |
| #Prevent spotlight from indexing your backup drive to speed up backups and reduce CPU usage when backup drive is connected: | |
| sudo touch /Volumes/<drive_name>/.metadata_never_index | |
| # Some formatting shortcuts | |
| alias prettyjson='python -m json.tool' | |
| alias prettyxml='xmllint --format -' | |
| # Finder, show hidden files | |
| alias hidefiles='defaults write com.apple.finder AppleShowAllFiles TRUE' | |
| alias hidefiles='defaults write com.apple.finder AppleShowAllFiles FALSE' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment