grep
Search all lines with specified string in a file
Search all lines with specified string in a file pattern (test_1.txt, test_2.txt, test_3.txt ...)
Case insensitive search all lines with specified string in a file
match regex in files (*)
Match lines with the pattern starts with "first" and ends with "last" with anything in-between
search for full words, not for sub-strings
display line matches the pattern and N lines after match
display line matches the pattern and N lines before match
display line matches the pattern and N lines before match and N lines after match
search all files recursively
display all lines that doesn’t match the given pattern
display lines that doesn’t match all the given pattern (if there are more than one pattern)
count the number of lines that matches the pattern
count the number of lines that don’t match the pattern
display only the filenames containing the given pattern (test_1.txt, test_2.txt, test_3.txt ...)
Show only the matched string, not the whole line
show line number while displaying the output
Credit:
Find mac addresses
Find ip addresses
Last updated