I want to search a string in the directory (sub directories too) /www/mydirectory, the string is parcel. I have tried with the command grep -r "parcel". i got this from stackoverflow. But if i give this command, server is hanging up and displays nothing. Please help me in getting this.
Use this command
grep -nr "PARCEL" /var --color*
-n
for printing line number within the file
-r
searches recursively in sub-dirs as well
/var
is the top-level path from which the search is done recursively in all the sub-dirs & files
--color
highlights the grep'ed string in the output
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