I am trying to automate a set of terminal commands. I was given the below instructions and manually doing it works just fine, but I wanted to know if there was a way to use the Mac "Automator" on my Mac to make a script/batch so all I have to do is click on it to apply all of these no matter what computer I want to run it on. Is that possible? (see below)
If the error persists, please try running these commands at the terminal to see if that corrects the issue:
<?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>eicar</string>
<key>ProgramArguments</key>
<array>
<string>/bin/launchctl</string>
<string>limit</string>
<string>maxfiles</string>
<string>16384</string>
<string>16384</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>ServiceIPC</key>
<false/>
</dict>
</plist>
- Launch Terminal
- Type
sudo su
then enter your password to log in as root - Type
vi /Library/LaunchDaemons/com.apple.launchd.limit.plist
- When in the vi editor, press i to enter insert mode then paste the exact code content above (Cmd-V). This will force the limit to 16384 files per process and 16384 files total
- Save your file and quit using Esc followed by :wq
- Reboot your system, and check that it is working using the command
launchctl limit
com.apple.launchd.limit.plist
and copy and paste to/Library/LaunchDaemons/
folder infinder
. Anyway I'll show how to create this inAutomator
.