≡ Menu

Use grep command recursively to find text including all subdirectories

Fig.01: grep in action

Use the grep command recursively to go through all sub-directories under Linux / Unix / BSD / Apple OS X operating systems.

grep -r 'word' /path/to/dir

Share this tutorial on:

Examples and usage: HowTo: Use Grep Command In Unix / Linux To Search Subdirectories

{ 0 comments… add one }
Security: Are you a robot or human?
You can use these HTML tags and attributes: <strong> <em> <pre> <code> <a href="" title="">

   Tagged with: