Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have ran a command to find a string in files on the server like this:

cd /
grep -r "string to be found" *

And the server returned some results like this

Binary file dev/disk/by-path/pci-0000:00:10.0-scsi-0:0:0:0-part1 matches
Binary file dev/disk/by-path/pci-0000:00:10.0-scsi-0:0:0:0 matches

As far as I know these are files that keep the actual storage on the raid matrix (please correct me if I am wrong). How can I find exactly where my match is located?

Is there any faster solution to this than running "grep" all accross the files of the server?

Thank you for your time!

share|improve this question

1 Answer 1

Generally on a binary file you have to do something like:

$ string /binary/file | grep -i whatuwant

but if u want search on text file, my advice is:

$ find / -type f -exec grep -i whatuwant '{}' ';'
share|improve this answer
    
Actually what I want is to find a script that performs a bruteforce attack on some domain. The string that I am searching for is the domainname itself. So if there are any matches it means that there is a particular script doing so –  mugur Jul 23 '13 at 18:46
    
Is the script active? –  Aaron Copley Jul 23 '13 at 18:53
    
yes because i receive from time to time notifications like this one pastebin.com/raw.php?i=84vJ6eWv from time to time –  mugur Jul 23 '13 at 20:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.