Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save dmitryd/16902ad3a5defd42d012 to your computer and use it in GitHub Desktop.
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`
<?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>
@octoviaa
Copy link

Thank you for sharing this.
The instruction works perfectly with OSX Sierra.

@Artoria2e5
Copy link

Artoria2e5 commented Jan 10, 2020

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>

Copy link

ghost commented Mar 5, 2020

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!

@dmitryd
Copy link
Author

dmitryd commented Mar 14, 2020

@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