Skip to content

Instantly share code, notes, and snippets.

@trytuna
Last active March 28, 2017 12:45
Show Gist options
  • Save trytuna/f4b8ef3dbae59092d2371d94ab05416b to your computer and use it in GitHub Desktop.
Save trytuna/f4b8ef3dbae59092d2371d94ab05416b to your computer and use it in GitHub Desktop.
Prevent external USB HDD from spinning down
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.example.keepmealive</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/touch</string>
<string>/Volumes/MiniServer/keepmealive</string>
</array>
<key>StartInterval</key>
<integer>600</integer>
</dict>
</plist>
@trytuna
Copy link
Author

trytuna commented Mar 28, 2017

launchctl load -w ~/Library/LaunchAgents/keepmealive.plist

@trytuna
Copy link
Author

trytuna commented Mar 28, 2017

touch /Volumes/MiniServer/keepmealive

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment