How do I increase the ulimit -n on 10.10.3 There way on lion was this.From a previous post

echo 'kern.maxfiles=20480' | sudo tee -a /etc/sysctl.conf
echo -e 'limit maxfiles 8192 20480\nlimit maxproc 1000 2000' | sudo tee -a /etc/launchd.conf
echo 'ulimit -n 4096' | sudo tee -a /etc/profile


but the first two files don't exist on Yosemite
Now it's easier with OSX 10.11.4 
sysctl.conf does now exist, or can be created if it doesn't.
First line above

echo 'kern.maxfiles=20480' | sudo tee -a /etc/sysctl.conf


Second line above.Setting environment variables.
Can be set up ... Use this link. A short but useful how-to.

Third line above:
/etc/profile exists.

echo 'ulimit -n 4096' | sudo tee -a /etc/profile