Which Linux command is used to view the contents of a directory in a tree-like format? MCQ with Answer and Explanation

Which Linux command is used to view the contents of a directory in a tree-like format?
A. dir
B. find
C. ls -R
D. tree
Answer: Option D
Solution (By JKSSB Mock Tests)
The 'tree' command displays directories and subdirectories in a tree structure; may need installation.

Discuss this Question (0)

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

Practice More Operating Systems Questions

Question #1
In Linux, the 'lsblk' command is used to:
A. List mounted file systems
B. List block devices (like disks and partitions) in a tree format
C. Display disk usage
D. Show disk partitions only

Correct Answer: Option B


Explanation:
lsblk shows all block devices, their sizes, and mount points in a hierarchical view.

This question belongs to: Computer Operating Systems
Question #2
Which of the following terms describes a tiny, lightweight execution unit within a larger process that shares the parent process's memory space?
A. Thread
B. Kernel Core
C. Sect
D. Daemon

Correct Answer: Option A


Explanation:
A thread is a basic unit of CPU utilization. Multiple threads within the same process share code, data, and OS resources like open files.

This question belongs to: Computer Operating Systems
Question #3
What structural concept enables an application to continue running even if one of its sub-tasks is blocked or performing a slow operation?
A. Multithreading
B. Paging Out
C. Single-tasking
D. Defragmentation

Correct Answer: Option A


Explanation:
Multithreading splits an application into distinct execution pathways, enabling a background thread to wait for slow inputs while a foreground thread handles user interaction.

This question belongs to: Computer Operating Systems