grep

print lines matching a pattern

copy
169
11
grep -w -e '(.)(.).21' file

details |

copy
53
6
grep -rH --include='*.c' 'hello' /home/gigi

details |

copy
46
4
grep -w 'hello' *

details |

copy
43
13
grep --label=foo something

details |

copy
36
3
grep -E -e '^(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?).?987654321$' file

details |

copy
33
3
grep -H 'eli' /etc/passwd

details |

copy
28
2
grep -e '--cut here--' *

details |

copy
22
7
grep -C 2 'hello' *

details |

copy
21
1
grep -l 'main' *.c

details |

copy
17
2
grep -r 'hello' /home/gigi

details |

copy
15
0
grep -R root *look for the keyword root in all files recursively form the current directory

6 years, 4 months ago john 0 | details |

copy
12
0
cat /var/log/apache/access_log | grep 404Look for 404 logs in apache

6 years, 4 months ago john 0 | details |

copy
13
0
Check if your computer is 32 or 64bitgrep --color=always -iw lm /proc/cpuinfoif you see "lm" in the out put your computer is 64bit

5 years ago gitweb 0 |

copy
13
1
grep -rH 'hello' *.c

details |

copy
11
0
grep --binary-files=text

source | details |

copy
11
0
echo 1 2 3 4 | grep 4look for occurrences of 4 in 1 2 3 4

6 years, 4 months ago john 0 | details |

copy
7
0
grep -P

source | details |

copy
8
0
cat /etc/passwd | grep rootlook for the root user in /etc/passwd

6 years, 4 months ago john 0 | details |