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 *

 

 

 

1654 IMPEDANCE COMPARATOR GENERAL RADIO UNKNOWN
$9.89 1654 IMPEDANCE COMPARATOR GENERAL RADIO UNKNOWN picture
HP 4191A RF Impedance analyzer operating & service manual 4608 J
$39.98 HP 4191A RF Impedance analyzer operating & service manual 4608 J picture
*DARE ENFORCER MODEL DE 6400 LOW IMPEDANCE ELECTRIC FENCE ENERGIZER For parts
$49.99 *DARE ENFORCER MODEL DE 6400 LOW IMPEDANCE ELECTRIC FENCE ENERGIZER For parts picture
Agilent E2697A High Impedance Adapter
$900.0 Agilent E2697A High Impedance Adapter picture
Matrix XFMR-50-75N Impedance Matching Transformer Connector 75-50 Ohm
$69.99 Matrix XFMR-50-75N Impedance Matching Transformer Connector 75-50 Ohm picture

Powered by WordPress. Designed by WooThemes