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 *

 

 

 

Motherboard H55M-E23 + I5 CPU K 655 + 4Gb RAM
$69.0 Motherboard H55M-E23 + I5 CPU K 655 + 4Gb RAM picture
2012 Hobart HCM 450 Vertical Cutter Mixer 45 qt VCM Food Processor Chopper
$4499.99 2012 Hobart HCM 450 Vertical Cutter Mixer 45 qt VCM Food Processor Chopper picture
H&L RAM CONTROL CPU 6514/2B USED IN TRUMPF PUNCH (P/N 099392) - 30 DAY WARRANTY
$499.0 H&L RAM CONTROL CPU 6514/2B USED IN TRUMPF PUNCH (P/N 099392) -  30 DAY WARRANTY picture
UA880Z MME Vintage CPU analogue Z80
$12.0 UA880Z MME Vintage CPU analogue Z80 picture
INS8080AN CPU Processor National Semiconductor 8080A - USED Socket Pull Qty 1
$13.99 INS8080AN CPU Processor National Semiconductor 8080A - USED Socket Pull Qty 1  picture

Powered by WordPress. Designed by WooThemes