grep

Creator
Creator
Seonglae ChoSeonglae Cho
Created
Created
2020 Jan 3 2:16
Editor
Edited
Edited
2026 Jun 15 10:4

| grep regex

netstat | grep TIME_WAIT | wc -l netstat | grep ESTABLISHED | wc -l

grep alias

find / | grep "*." egrep = grep -E # 'egrep' grep -E fgrep = grep -F # 'fgrep' grep -F grep = grep -G # 'grep' grep -G
 

line

  • -r - recursive
  • -n - which line
grep -nr 'yourString*' .
grep -A 2 -B 3 "some_keyword" * # front 3 lines, end 2 lines
 

grep count

grep -c "some_keyword" some_file
 
 

which file

  • -H - which file
grep -H "some_keyword" *
 
 
 
 
 
How can I use grep to find a word inside a folder?
Thanks for contributing an answer to Stack Overflow! Please be sure to answer the question. Provide details and share your research! Asking for help, clarification, or responding to other answers. Making statements based on opinion; back them up with references or personal experience. To learn more, see our tips on writing great answers.
How can I use grep to find a word inside a folder?
command line grep * does not work but grep *. works
From your output it is apparent that you want to find all files that belong to "staff" group and created at hour 22 ( or 10 pm in 12 hour format ). We'll address that below, but lets first figure out what your grep commands do and why they're not the right tool for what you want.
command line grep * does not work but grep *. works
Start from the Beginning : 네이버 블로그
 
 

Recommendations