Which Linux terminal command is used to display the lines of a file that match a specified keyword or regular expression? MCQ with Answer and Explanation

Which Linux terminal command is used to display the lines of a file that match a specified keyword or regular expression?
A. find
B. grep
C. echo
D. cat
Answer: Option B
Solution (By JKSSB Mock Tests)
The 'grep' command stands for global regular expression print, designed to quickly filter out specific data strings from files or text feeds.

Discuss this Question (0)

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

Practice More Operating Systems Questions

Question #1
Which Microsoft Windows command line utility is used to clear all previous text from the command prompt screen window?
A. cls
B. clear
C. clean
D. reset

Correct Answer: Option A


Explanation:
The 'cls' command stands for clear screen and resets the visible text buffer of the Windows command prompt terminal environment.

This question belongs to: Computer Operating Systems
Question #2
Which of the following commands is used in Linux to change the read, write, and execute permissions of a specific file?
A. chmod
B. chown
C. mkdir
D. pwd

Correct Answer: Option A


Explanation:
The 'chmod' command stands for 'change mode' and is used to alter access permissions for files and directories in Unix-like systems.

This question belongs to: Computer Operating Systems
Question #3
Which component of the Linux operating system translates user terminal text commands directly into specific actions understood by the kernel?
A. Shell
B. BIOS
C. Compiler
D. GUI Desktop

Correct Answer: Option A


Explanation:
The shell is a specialized command-line interpreter program that accepts text inputs from the user and executes system commands via the kernel.

This question belongs to: Computer Operating Systems