LPI Linux Essentials Complete Practice Exam 2025

Question: 1 / 400

When using the 'grep' command, what functionality does the '-i' option provide?

It searches recursively

It ignores case sensitivity

The '-i' option in the 'grep' command enables case-insensitive searching. This means that when you use 'grep' with this option, it will match lines in the input regardless of whether the characters are uppercase or lowercase. For example, searching for "apple" will find matches for "apple," "Apple," "APPLE," or any other case variation of that word. This functionality is particularly useful in scenarios where the case of the text may vary, allowing for a broader and more flexible search across files.

The other options relate to different functionalities of ‘grep’ but do not pertain to case sensitivity. For instance, recursive searching would typically utilize the '-r' or '--recursive' option, while showing line numbers would involve the '-n' option. Inverting the match is achieved with the '-v' option, which reverses the search outcome to show lines that do not match the provided pattern. Each of these options serves a unique purpose, but the '-i' specifically addresses the need for case insensitivity.

Get further explanation with Examzify DeepDiveBeta

It shows line numbers

It inverts the match

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy