Skip to content

Instantly share code, notes, and snippets.

@hawkeyetwolf
Last active December 22, 2015 16:47
Show Gist options
  • Save hawkeyetwolf/5e4ab548cb34d634f418 to your computer and use it in GitHub Desktop.
Save hawkeyetwolf/5e4ab548cb34d634f418 to your computer and use it in GitHub Desktop.
Increase OS X Open Files Limit (bash script)
#!/bin/bash
echo '<?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>Increase open files limit</string>
<key>ProgramArguments</key>
<array>
<string>/bin/launchctl</string>
<string>limit</string>
<string>maxfiles</string>
<string>unlimited</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>ServiceIPC</key>
<false/>
</dict>
</plist>' | sudo tee /Library/LaunchDaemons/com.apple.launchd.limit.plist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment