rm 删除时报错’Argument list too long’
清理 /var/log/journal 下的内容
1 2 3 4 5
| journalctl --disk-usage
journalctl --vacuum-size=500M
|
ulimit 值超出允许范围导致无法登陆操作系统
一般在/etc/security/limits.conf文件中设置各种限制值。
但是请注意,如果你在文件中设置,你可能设置的值超出范围,导致不可预知的后果,例如无法登陆操作系统。
下面这个对open files的限制就是一个例子,它不识别unlimited,是一个有限的值。
所以如果你在/etc/security/limits.conf中设置了
1 2
| * soft nofile unlimited * hard nofile unlimited
|
那就完蛋了,因为你接下来的进程将登陆不了系统了。
我们最好先使用ulimit命令验证一下你将要设置的值是否合法。
1 2 3 4 5 6 7
| [root@root ~]# ulimit -n 1024000000 -bash: ulimit: open files: cannot modify limit: Operation not permitted [root@root ~]# ulimit -n 9999999999 -bash: ulimit: open files: cannot modify limit: Operation not permitted [root@root ~]# ulimit -n 9999999 -bash: ulimit: open files: cannot modify limit: Operation not permitted [root@root ~]# ulimit -n 999999
|