Which Linux command is used to compare two files line by line? MCQ with Answer and Explanation

Which Linux command is used to compare two files line by line?
A. comm
B. cmp
C. sdiff
D. diff
Answer: Option D
Solution (By JKSSB Mock Tests)
diff shows differences between files; cmp compares byte by byte; comm compares sorted files.

Discuss this Question (0)

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

Practice More Operating Systems Questions

Question #1
Which command in Linux is used to display the currently logged-in user accounts and terminal details?
A. id
B. pwd
C. who
D. uname

Correct Answer: Option C


Explanation:
The 'who' command queries system accounting data to display information about users currently logged into the operating system session.

This question belongs to: Computer Operating Systems
Question #2
Which Windows command is used to shut down the system from the command line?
A. shutdown /s
B. stop
C. poweroff
D. exit

Correct Answer: Option A


Explanation:
shutdown /s initiates a system shutdown; other options exist for restart or hibernate.

This question belongs to: Computer Operating Systems
Question #3
What is the main purpose of the Windows 'Action Center'?
A. To view alerts and manage system notifications
B. To control system updates
C. To configure firewall settings
D. To manage user accounts

Correct Answer: Option A


Explanation:
Action Center displays notifications and alerts about system security, maintenance, and app messages.

This question belongs to: Computer Operating Systems