sh 如何更改OS X和macOS上的打开文件限制

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 如何更改OS X和macOS上的打开文件限制相关的知识,希望对你有一定的参考价值。

#!/bin/sh

# These are the original gist links, linking to my gists now.
# curl -O https://gist.githubusercontent.com/a2ikm/761c2ab02b7b3935679e55af5d81786a/raw/ab644cb92f216c019a2f032bbf25e258b01d87f9/limit.maxfiles.plist
# curl -O https://gist.githubusercontent.com/a2ikm/761c2ab02b7b3935679e55af5d81786a/raw/ab644cb92f216c019a2f032bbf25e258b01d87f9/limit.maxproc.plist

curl -O https://gist.githubusercontent.com/tombigel/d503800a282fcadbee14b537735d202c/raw/ed73cacf82906fdde59976a0c8248cce8b44f906/limit.maxfiles.plist
curl -O https://gist.githubusercontent.com/tombigel/d503800a282fcadbee14b537735d202c/raw/ed73cacf82906fdde59976a0c8248cce8b44f906/limit.maxproc.plist

sudo mv limit.maxfiles.plist /Library/LaunchDaemons
sudo mv limit.maxproc.plist /Library/LaunchDaemons

sudo chown root:wheel /Library/LaunchDaemons/limit.maxfiles.plist
sudo chown root:wheel /Library/LaunchDaemons/limit.maxproc.plist

sudo launchctl load -w /Library/LaunchDaemons/limit.maxfiles.plist
sudo launchctl load -w /Library/LaunchDaemons/limit.maxproc.plist

以上是关于sh 如何更改OS X和macOS上的打开文件限制的主要内容,如果未能解决你的问题,请参考以下文章

sh 如何在OS X中更改符号链接?

如何在 macOS 上的 Sublime Text 中在同一窗口中打开文件和文件夹?

sh 如何杀死mac os x终端上的端口

sh 如何杀死mac os x终端上的端口

sh 将文件夹转换为OS X上的应用程序

sh [OpenMeta 2 MacOS标签]读取OpenMeta标签并将其写入OS X Mavericks标签的脚本#tag #openmeta #convert