关于/etc/security/limits.conf配置文件的sed操作
limits.conf文件中含有tab制表符
使用[[:space:]]*
, *
匹配一个或多个空格或tab;grep同样适用
查看值
grep -E "[[:space:]]*soft[[:space:]]*nofile|[[:space:]]*hard[[:space:]]*nofile" /etc/security/limits.conf
修改值
sed -i "s/dmdb[[:space:]]*soft[[:space:]]*nofile[[:space:]]*65535$/dmdb soft nofile 655350/" /etc/security/limits.conf