Grep recursive single type

broken image

The command should be like this ~/Downloads$ grep -r 'Linux' Syntax of is shown as below- $ grep -r 'word'įor example, for searching “Linux” word in Downloads directory. Using the grep command, we can recursively search all files for a string on a Linux.

broken image

Use grep to search for lines of text that match one or many regular expressions, and outputs only the matching lines. The grep command is used to search text or scans the given record for lines containing a match to the given strings or words.

broken image