nerdexam
LPI

303-300 · Question #56

Which of the following resources of a shell and its child processes can be controlled by the Bash build- in command ulimit? (Choose THREE correct answers.)

The correct answer is A. The maximum size of written files B. The maximum number of open file descriptors E. The maximum number of user processes. ulimit maps directly to kernel resource limits (setrlimit system call), and options A, B, and E each correspond to real, configurable limits: -f caps the maximum size of files a process can write, -n limits the number of open file descriptors, and -u restricts the maximum…

Host Security

Question

Which of the following resources of a shell and its child processes can be controlled by the Bash build- in command ulimit? (Choose THREE correct answers.)

Options

  • AThe maximum size of written files
  • BThe maximum number of open file descriptors
  • CThe maximum number of newly created files
  • DThe maximum number of environment variables
  • EThe maximum number of user processes

How the community answered

(50 responses)
  • A
    94% (47)
  • C
    2% (1)
  • D
    4% (2)

Explanation

ulimit maps directly to kernel resource limits (setrlimit system call), and options A, B, and E each correspond to real, configurable limits: -f caps the maximum size of files a process can write, -n limits the number of open file descriptors, and -u restricts the maximum number of processes a user can run simultaneously. Option C is wrong because ulimit has no concept of "number of files created" - it can limit how large a written file gets, but not how many files are created. Option D is wrong because environment variables are a user-space shell feature, not a kernel resource limit, so ulimit has no mechanism to control them. A helpful memory tip: think of ulimit as controlling kernel-tracked resources (file size, file descriptors, processes, memory, CPU time) - if it's not tracked by the OS kernel per-process, ulimit can't limit it.

Topics

#ulimit#resource limits#file descriptors#process management

Community Discussion

No community discussion yet for this question.

Full 303-300 Practice