Which of the following Linux commands is/are used to search content from…

2023

Which of the following Linux commands is/are used to search content from files? commands: i) grep ii) egrep iii) fgrep iv) find v) tail vi) tr

Answer: A. i, ii and iii onlyOption 1: i, ii and iii only The grep family of commands is specifically designed for searching plain-text data sets for lines that match a regular…

  1. A.

    i, ii and iii only

  2. B.

    ii, iii and iv only

  3. C.

    v and vi only

  4. D.

    iv only

Attempted by 161 students.

Show answer & explanation

Correct answer: A

Option 1: i, ii and iii only

The grep family of commands is specifically designed for searching plain-text data sets for lines that match a regular expression.

  • grep: The standard Global Regular Expression Print command.

  • egrep: (Extended grep) used for searching using extended regular expressions.

  • fgrep: (Fixed grep) used for searching for fixed strings rather than regular expressions, which is faster for simple text searches

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Rssb Senior Computer Instructor

Loading lesson…