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 *

 

 

 

LOT OF 2 INTEL XEON SLACB CPU/MICROPROCESSORS E5310
$19.99 LOT OF 2 INTEL XEON SLACB CPU/MICROPROCESSORS E5310 picture
Dell PowerEdge 1950 E1624 Server (9423)
$24.95 Dell PowerEdge 1950 E1624 Server (9423) picture
Qty 2 Dell Poweredge 1950 Servers w/ Nortel CCMS CCMA Contact Center Management
$1199.0 Qty 2 Dell Poweredge 1950 Servers w/ Nortel CCMS CCMA Contact Center Management picture
INTEL XEON E5-2620V3 SR207 2.40GHZ L503C185 CPU PROCESSOR
$199.99 INTEL XEON E5-2620V3 SR207 2.40GHZ L503C185 CPU PROCESSOR picture
LAMBDA LS SUTTER INSTRUMENT COMPANY XEON ARC LAMP W/ FILTER
$1300.0  LAMBDA LS SUTTER INSTRUMENT COMPANY XEON ARC LAMP W/ FILTER picture

Powered by WordPress. Designed by WooThemes