Linux Recursive GREP search excluding directories example

This command will search for text inside files in a directory while excluding some directories you do not want to search in.

This is helpful when a search is going slow due to a directory that might contain thousands of files that you are not interested in searching through, such as an images or cache directory.

grep -r –exclude-dir=product_images –exclude-dir=cache –exclude-dir=.svn search term *

 

 

 

HP 5315A Universal Frequency Counter
$79.99 HP 5315A Universal Frequency Counter  picture
Q72080IARD Toshiba 7 1/2HP Variable Frequency Drive
$500.0 Q72080IARD Toshiba 7 1/2HP Variable Frequency Drive picture
Harms and Wende HW12416 Medium Frequency System HW2000 50/60Hz 3PH 480V
$450.0 Harms and Wende HW12416 Medium Frequency System HW2000 50/60Hz 3PH 480V picture
Do-All Traps ESQM-B Earshield Quad Muff Adjustable Frequency Tuning Black
$89.99 Do-All Traps ESQM-B Earshield Quad Muff Adjustable Frequency Tuning Black picture
General Electric Fuji 6KE$243005X1B1 3Phase 5HP Variable Frequency Drive
$440.0 General Electric Fuji 6KE$243005X1B1 3Phase 5HP Variable Frequency Drive picture

Powered by WordPress. Designed by WooThemes