Terminal Commands Collection

Discussion in 'macOS' started by davidlv, Dec 27, 2010.

  1. davidlv macrumors 65816

    Joined:
    Apr 5, 2009
    Location:
    Kyoto, Japan
    #1
    Here are some of the terminal commands I have collected over the years, feel free to add or correct any:

    Disable Spotlight
    sudo mdutil -i off /Volumes/volume name

    substituting as appropriate for all mounted volumes. This permanently disables indexing on that volume

    Disable Dashboard
    defaults write com.apple.dashboard mcx-disabled -boolean YES
    killall Dock

    Enabling Dashboard- type or paste the following exactly into the Terminal window:
    defaults write com.apple.dashboard mcx-disabled -boolean NO
    killall Dock

    disabling SMS:
    sudo pmset -a sms 0

    turn off hibernate mode:
    sudo pmset hibernatemode 0

    if you want to reclaim the space the hibernate file takes up (valuable on an SSD), you use the Go to folder menu for that. The file is found in the /var/vm/ folder, and is named sleepimage. Simply delete that file, after a reboot.

    disable quarantine:
    Starting in Leopard (I believe) when you open a file downloaded from the web, OS X asks if you really mean it. While it is intended to stop maliciousness, it is only a source of aggravation for me. While there are some hints here on working around it, it turns out that you can disable it completely using a Terminal command:

    defaults write com.apple.LaunchServices LSQuarantine -bool NO

    After that, reboot, and you should be set. (If you want to disable quarantine for files already downloaded, you can run this in 10.6 : xattr -d -r com.apple.quarantine ~/Downloads. In 10.5, you need to use this instead: find ~/Downloads -type df -exec xattr -d com.apple.quarantine {}.)

    The credit for this tip should really go to Jonathan 'Wolf' Rentzsch, who published it on his Tumblr. He, in turn, credits Ken Aspeslagh with telling him about the defaults write via Twitter.
     
  2. wrldwzrd89 macrumors G5

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #2
    Thanks, those are really useful Terminal commands for Mac OS X! I was wondering how you disabled Dashboard - now I know.
     

Share This Page