Which Linux command is used to count the number of lines, words, and characters in a file? MCQ with Answer and Explanation

Which Linux command is used to count the number of lines, words, and characters in a file?
A. grep -c
B. count
C. wc
D. ls -l
Answer: Option C
Solution (By JKSSB Mock Tests)
wc (word count) with -l, -w, -c options counts lines, words, and characters respectively.

Discuss this Question (0)

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

Practice More Operating Systems Questions

Question #1
What is the purpose of the Android 'AccessibilityManager'?
A. To manage accessibility settings
B. To control gesture navigation
C. To provide accessibility features and services for users with disabilities
D. To handle screen readers

Correct Answer: Option C


Explanation:
AccessibilityManager enables apps to assist users with disabilities, e.g., text-to-speech, magnification.

This question belongs to: Computer Operating Systems
Question #2
What is the purpose of the 'chkdsk' utility command in a Microsoft Windows environment?
A. To scan and repair structural file system errors and bad sectors on a storage volume.
B. To monitor internet data usage.
C. To update the motherboard BIOS firmware to the latest version.
D. To clean up browser history and cookies from the main storage.

Correct Answer: Option A


Explanation:
The CHKDSK (Check Disk) utility inspects file systems and hard drives for physical or logical integrity issues and repairs them.

This question belongs to: Computer Operating Systems
Question #3
Which of the following Android components represents a background service without a user interface, designed to perform long-running tasks like fetching web data or playing audio?
A. Content Provider
B. Service
C. Activity
D. Broadcast Receiver

Correct Answer: Option B


Explanation:
An Android 'Service' is an application component designed to handle background tasks (like music playback or network synchronization) without an explicit user interface.

This question belongs to: Computer Operating Systems