Created
June 29, 2015 14:38
-
-
Save dmitryd/16902ad3a5defd42d012 to your computer and use it in GitHub Desktop.
"noatime" for OS X on SSD. Place this file to /Library/LaunchDaemons/com.noatime.root.plist and do `sudo launchctl load -w /Library/LaunchDaemons/com.noatime.root.plist`
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
<?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.noatime.root</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/sbin/mount</string> | |
<string>-vuwo</string> | |
<string>noatime</string> | |
<string>/</string> | |
</array> | |
<key>RunAtLoad</key> | |
<true/> | |
</dict> | |
</plist> |
An idea for making it a bit more flexible: just route it through the shell's for loop.
<?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.noatime.root</string>
<key>ProgramArguments</key>
<array>
<string>/bin/sh</string>
<string>-c</string>
<string>for i; do /sbin/mount -vuwo noatime "$i"; done</string>
<!-- Put any number of mount points here: -->
<string>/</string>
<string>/System/Volumes/Data</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
I am getting the following error when trying to execute the command: /Library/LaunchDaemons/com.noatime.root.plist: Path had bad ownership/permissions
Can you please help? Thank you!
@Artoria2e5 why would you need to loop there? One command is enough.
@nadsim Google still works and the answer is at the first result there.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you for sharing this.
The instruction works perfectly with OSX Sierra.