Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
"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

This comment has been minimized.

Copy link

@octoviaa octoviaa commented Aug 19, 2017

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

@Artoria2e5

This comment has been minimized.

Copy link

@Artoria2e5 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>
@nasdim

This comment has been minimized.

Copy link

@nasdim nasdim 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

This comment has been minimized.

Copy link
Owner Author

@dmitryd 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