In Linux, the command 'rm -rf' is used to: MCQ with Answer and Explanation

In Linux, the command 'rm -rf' is used to:
A. Rename a file
B. Remove empty directories only
C. Forcefully remove directories and their contents recursively
D. Read a file forcefully
Answer: Option C
Solution (By JKSSB Mock Tests)
rm -rf (remove recursively and forcefully) deletes directories and files without confirmation, so it's dangerous.

Discuss this Question (0)

No comments yet. Be the first to start the discussion!

Practice More Operating Systems Questions

Question #1
Which file allocation method stores blocks of a file in an ordered sequence linked together via pointers, eliminating external fragmentation but making random access slow?
A. Linked Allocation
B. Indexed Allocation
C. Direct Directory Mapping
D. Contiguous Allocation

Correct Answer: Option A


Explanation:
Linked allocation chains blocks together using pointers, allowing dynamic size expansions but requiring linear scanning to read a specific internal offset.

This question belongs to: Computer Operating Systems
Question #2
What mechanism does an operating system use to simulate an environment where multiple processes run concurrently on a single CPU core by switching between them rapidly?
A. Asymmetric Multiprocessing
B. Defragmentation Scaling
C. Time-Slicing (via Context Switching)
D. Direct Memory Mapping

Correct Answer: Option C


Explanation:
Time-slicing leverages rapid, scheduled context switching to give users the illusion of smooth, concurrent application execution on a single core.

This question belongs to: Computer Operating Systems
Question #3
In Windows, the 'Registry' has five root keys. Which one contains information about the current hardware configuration?
A. HKEY_CURRENT_CONFIG
B. HKEY_LOCAL_MACHINE\HARDWARE
C. HKEY_CLASSES_ROOT
D. HKEY_CURRENT_USER

Correct Answer: Option A


Explanation:
HKEY_CURRENT_CONFIG (HKCC) stores information about the current hardware profile; HKLM\HARDWARE also contains hardware info.

This question belongs to: Computer Operating Systems