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

  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 73 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

Explore the full course: Uppsc Polytechnic Lecturer 2025 Cs