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 *

 

 

 

NEW AN830L Ohmmeter Ammeter AUTO Digital Voltmeter Multimeter Volt AC DC Tester
$3.99 NEW AN830L Ohmmeter Ammeter AUTO Digital Voltmeter Multimeter Volt AC DC Tester picture
1/2/5PCS DC 0-200V 10A Dual Digital LED 4 Bit 5 Wires Amp Voltmeter Ammeter
$3.35 1/2/5PCS DC 0-200V 10A Dual Digital LED 4 Bit 5 Wires Amp Voltmeter Ammeter picture
1/2/5PCS DC 0-200V 10A Dual Digital LED 4 Bit 5 Wires Amp Voltmeter Ammeter
$3.35 1/2/5PCS DC 0-200V 10A Dual Digital LED 4 Bit 5 Wires Amp Voltmeter Ammeter picture
1/2/5PCS DC 0-200V 10A Dual Digital LED 4 Bit 5 Wires Amp Voltmeter Ammeter
$6.59 1/2/5PCS DC 0-200V 10A Dual Digital LED 4 Bit 5 Wires Amp Voltmeter Ammeter picture
1/2/5PCS DC 0-200V 10A Dual Digital LED 4 Bit 5 Wires Amp Voltmeter Ammeter
$12.95 1/2/5PCS DC 0-200V 10A Dual Digital LED 4 Bit 5 Wires Amp Voltmeter Ammeter picture

Powered by WordPress. Designed by WooThemes