Example 1—querying limits:
$ prlimit
Output for the preceding command is as follows:
$ ps PID TTY TIME CMD 2917 pts/7 00:00:00 bash 3339 pts/7 00:00:00 ps$ prlimit --pid=2917RESOURCE DESCRIPTION SOFT HARD UNITSAS address space limit unlimited unlimited bytesCORE max core file size unlimited unlimited bytesCPU CPU time unlimited unlimited seconds[...]$
Here, we have abbreviated the output for better readability.
Example 2—set the resource limits for max file size and max stack size for the (preceding) shell process:
$ prlimit --pid=2917 --fsize=2048000 --stack=12582912 $ prlimit --pid=2917 | egrep -i "fsize|stack" ...