问题
Yes, I want to remove all ulimits and set them to unlimited. How do I do this? Thanks!
回答1:
Use something like this:
for opt in $(ulimit -a | sed 's/.*\-\([a-z]\)[^a-zA-Z].*$/\1/'); do
ulimit -$opt ulimited
done
Caution, check output of ulimit -a | sed 's/.*\-\([a-z]\)[^a-zA-Z].*$/\1/' first, ulimit -a output may differ from system to system.
来源:https://stackoverflow.com/questions/28068414/how-do-i-set-all-ulimits-unlimited-for-all-users