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 *

 

 

 

ALCATEL LUCENT OMNIPCX ENTERPRISE + DIGITAL INTERFACE UAI8 SERVER
$150.0 ALCATEL LUCENT OMNIPCX ENTERPRISE + DIGITAL INTERFACE UAI8 SERVER picture
ExacqVision Camera Server IP04-04T-R2A
$1600.0 ExacqVision Camera Server IP04-04T-R2A picture
Xerox Fiery Server Tower External EX C60/70 runs C60 C70 models
$875.0 Xerox Fiery Server Tower External EX C60/70 runs C60 C70 models  picture
Server Products 82507 Adapter Ring For Server Warmer
$37.82 Server Products 82507 Adapter Ring For Server Warmer picture
Server 94030 chilled condiment dispenser with pump, stainless steel USF approved
$48.59 Server 94030 chilled condiment dispenser with pump, stainless steel USF approved picture

Powered by WordPress. Designed by WooThemes