I need to use the grep facility on the whole server.
I tried the following:
grep -r 'MyString' /
grep -r 'MyString' /*
However, none of these seem to work. Any suggestions?
|
Are you SURE you want to do this though? This will traverse all filesystems (local or not) and may very well max out the CPU on your server. |
|||||||
|
If you're looking for particular file types:
|
|||
|
|
|
I second nont's approach. But if your not root you'll get a whole bunch of permission denied messages, redirect those to /dev/null. Then you'll get what you want back.
|
|||
|
|
|
Install ack, which is packaged as
The To limit the search to particular file types:
noting that the argument to Or for file types which ack knows about already, such as C++ files:
|
||||
|
|