Linux:ulimit命令

来自WHY42
imported>Soleverlee2016年8月19日 (五) 01:51的版本 (以“ulimit is a builtin shell command used to show and set various restrictions on resource usage for a shell. Among the limitations that can be set you find, maximum fi...”为内容创建页面)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

ulimit is a builtin shell command used to show and set various restrictions on resource usage for a shell. Among the limitations that can be set you find, maximum file size, maximum core file size, maximum size of resident memory. Though the restrictions are shell-independent, the exact syntax depends on what shell you are running.

It is a good practice to set some of these limitations to prevent for instance a faulty shell script to start unlimited copies of itself or to prevent users on the system to start processes that run forever.

Warning: Typing ulimit may result in the output "unlimited". That is misleading, you may have limits in place as you can find out with ulimit -a