Welcome to Praful Bhuskute BlackSpy Praful Bhuskute BlackSpy Praful Bhuskute BlackSpy Praful Bhuskute BlackSpy

How to Search specific text in Ubuntu

The grep filter searches a file for a particular pattern of characters, and displays all lines that contain that pattern. 

Syntax
				
					grep -Rw '[path where you want to searcg]' -e 'your text that you need to search'
				
			
Explanation
				
					-R : Regular Expression
				
			
				
					-w : Match whole word
				
			
				
					-e exp : Specifies expression with this option. Can use multiple times.
				
			

Full syntax copy-paste directly to terminal replace only text 

				
					grep -Rw '/var/www/html/' -e 'your text that you need to search'
				
			

Drop your queries

Table of Contents

Have A Project In Mind? Let's Get To Work