Grep Command

Grep Command attributes

Recursively Search a sting in current directory

grep -inr 'search-text' .

Search in specific file pattern

grep -inr --include="*txt" "search-text" .

Grep with only first 150 text of lines

grep -inr 'search-text' | cut -c 1-150

Leave a Comment