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 *

 

 

 

5 Pieces 60-375pf trimmer capacitors [READ DESCRIPTION] QRP RADIO, HAM RADIO
$7.5 5 Pieces 60-375pf trimmer capacitors [READ DESCRIPTION]  QRP RADIO, HAM RADIO picture
(10 Piece Lot) 470 pf 1000 volt 1KV 10% Z5F leaded ceramic capacitor
$5.5 (10 Piece Lot) 470 pf 1000 volt 1KV 10% Z5F leaded ceramic capacitor picture
105-126 MFD (uF) 1.0 1.5 and 2 HP Well Pump Control Box Motor Start Capacitor 27
$25.78 105-126 MFD (uF) 1.0 1.5 and 2 HP Well Pump Control Box Motor Start Capacitor 27 picture
Washi Tape 4PCS/Pack Christmas Reindeer Stripe Dot DIY Scrapbooking Maski... New
$9.99 Washi Tape 4PCS/Pack Christmas Reindeer Stripe Dot DIY Scrapbooking Maski... New picture
Titan TRCFD8075 Dual Rated Motor Run Capacitor Round MFD 80/7.5 Volts 440/370
$39.96 Titan TRCFD8075 Dual Rated Motor Run Capacitor Round MFD 80/7.5 Volts 440/370 picture

Powered by WordPress. Designed by WooThemes