Search a keyword in a directory using terminal

Hi fellows this is a very important command for a programmer and a terminal user. You don’t know where a function can be made within a project So this terminal command provides you the access to search within a directory.

grep -r “newness” /home/shakalya/Desktop/swimnchill/twentyeleven

I am searching ‘newness’ in the whole twentyeleven directory.

You can do it online server if you have access to SSH.

For Ubuntu users make a sudo command.

sudo grep -r “newness” /home/shakalya/Desktop/swimnchill/twentyeleven

 

Leave a Comment