Which Linux terminal command outputs the total number of lines, words, and characters contained inside a specified text file? MCQ with Answer and Explanation

Which Linux terminal command outputs the total number of lines, words, and characters contained inside a specified text file?
A. ls -s
B. grep
C. wc
D. count
Answer: Option C
Solution (By JKSSB Mock Tests)
The 'wc' (word count) command calculates and prints line counts, word totals, and byte metrics for a targeted text file.

Discuss this Question (0)

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

Practice More Operating Systems Questions

Question #1
Which of the following commands can be used in Linux to move a file or rename it directly?
A. mv
B. cp
C. rn
D. ren

Correct Answer: Option A


Explanation:
The 'mv' command stands for move and is used in Unix-like systems to either move a file to another path or change its name.

This question belongs to: Computer Operating Systems
Question #2
Which Linux command is used to display disk usage in a human-readable format?
A. du -h
B. df -h
C. fdisk -l
D. lsblk

Correct Answer: Option B


Explanation:
df -h shows file system disk space usage in human-readable format (GB, MB).

This question belongs to: Computer Operating Systems
Question #3
What is the primary difference between Multitasking and Multiprocessing operating systems?
A. Multitasking switches between multiple programs on a single CPU, while Multiprocessing executes multiple tasks simultaneously using two or more CPUs.
B. There is no difference; both terms represent the exact same technology.
C. Multitasking requires multiple physical microprocessors, while multiprocessing runs on a single core.
D. Multiprocessing handles only peripheral devices, while multitasking manages user files.

Correct Answer: Option A


Explanation:
Multitasking simulates concurrent execution by rapidly switching a single CPU across tasks, whereas multiprocessing uses multiple distinct CPUs or cores to execute tasks truly concurrently.

This question belongs to: Computer Operating Systems