102-350 · Question #114
Which command is used to set restrictions on the size of a core file that is created for a user when a program crashes?
The correct answer is C. ulimit. See the full explanation below for the reasoning.
Question
Options
- Acore
- Bedquota
- Culimit
- Dquota
How the community answered
(33 responses)- A3% (1)
- B15% (5)
- C76% (25)
- D6% (2)
Community Discussion
15The answer is C, ulimit. My senior showed me this one hands-on when we were troubleshooting a runaway process that kept dumping massive core files and filling up the disk. The ulimit command is a shell built-in that lets you control resource limits for the current session or for a user, and the -c flag specifically targets core file size, so you can set it to 0 to disable core dumps entirely or cap them at a certain number of blocks. The other options are close enough to trip you up, edquota and quota deal with disk usage quotas for filesystems, and core is not even a real command here, it is just the name of the file that gets created when a process crashes.
Good call on ulimit -c, and worth adding that setting it in /etc/security/limits.conf makes it persistent across sessions instead of just the current shell.
ulimit is the answer here, option C. When I was prepping for this section I kept mixing it up with quota stuff, but ulimit is the one that controls resource limits for the shell and the processes it spawns, and the core file size specifically is set with ulimit -c. You run something like ulimit -c 0 to disable core dumps entirely, or give it a block size to cap how big they get. edquota and quota are for disk usage quotas on filesystems, totally different thing, and core is not a real command in this context.
Toby nailed it, and worth adding that ulimit -c unlimited is your best friend during debugging sessions since it removes the cap entirely and lets the kernel write the full core image for post-mortem analysis with gdb or similar tools.
Does "ulimit -c" ring any bells from your shell sessions?
Yeah, ulimit -c sets the max size for core dump files, so if you set it to 0 you are basically telling the kernel to not generate any core dumps at all, which can make debugging crashes a real headache when you actually need them.
The wording says "set restrictions" which made me second-guess ulimit for a second because it can also raise limits, not just lower them, but that is still the right tool here. edquota is the trap if you are rushing, since it deals with disk quotas and sounds vaguely related to limiting storage, but core file size is controlled per-process with ulimit -c, so C is your answer.
Honestly I went with B first because edquota felt right, it has "quota" in the name and I was thinking "restricting file size for a user" equals disk quota management. What snapped me out of it was remembering that quota and edquota are specifically for filesystem disk usage limits, not per-process resource controls. ulimit is the shell built-in that handles process-level limits, and the flag you need for core files specifically is ulimit -c, where setting it to 0 disables core dumps entirely or you give it a block size to cap them. That distinction between filesystem quotas and process resource limits is exactly what the exam tests, so lock it in now.
The one thing I'd add is that ulimit -c unlimited is worth knowing too, since some questions flip it and ask how to enable core dumps for debugging rather than disable them.
C is the clock-beater here, ulimit, know it cold and bank 30 seconds. I saw this exact question on my 102-350 sitting and flagged it by reflex before I even finished reading, circled back in 10 seconds flat.
edquota and quota are disk quota tools, not process limits. ulimit -c is your answer.
Carlos is right that ulimit -c controls core dump size, but to cap CPU or memory for a running process the real workhorse is ulimit -v for virtual memory or, better yet, cgroups if you need per-process enforcement that survives a new shell.
The stem is asking about per-user resource limits at the process level, not disk space management, and that distinction alone eliminates two of the four options immediately. edquota and quota both live in the disk quota space, meaning they control how much total filesystem space a user can consume, not what a single crashing process is allowed to dump. The word "core file" is your anchor here, and the command you want controls the ceiling on that dump size as a resource limit, not a storage quota. Before you lock in, think about where that limit actually lives: is it set at the filesystem level, at the shell level, or somewhere else, and what does that tell you about which tool reaches it?
Going with D on this one, because the quota command is specifically designed around controlling resource limits for users, and a core file is just another resource that the system tracks per user, so it fits squarely in the quota domain alongside disk blocks and inodes.
Appreciate the explanation, Prof. Sara, but it's actually C because ulimit is what directly controls the core file size limit at the process level, while quota manages disk block and inode allocations on a filesystem and has no mechanism to restrict or configure core dumps specifically.