I am using Ubuntu 12 . I am trying to search for the word "SymbolSetThree" in my Ubuntu Machine home directory .
For this i used
grep "SymbolSetThree" /home
It simply displayed as grep: /home: Is a directory
Please let me know how to search for a particular word in all the files in Linux ??
This is what i tried
sai@sai-Aspire-4720Z:/$ grep "SymbolSetThree" /home
grep: /home: Is a directory
Use `find:
find /home -type f | xargs grep SymbolSetThree
The same result can be achieved by using the -exec
argument to find
(instead of xargs
).
You are close, you just need the -r
switch to have your command working properly.
grep -r "SymbolSetThree" /home
will do the trick.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With