1

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!

Mike
  • 113
  • 1
  • 1
  • 9

1 Answers1

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 '{}' ';'
John Smith
  • 36
  • 1
  • 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 – Mike 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 http://pastebin.com/raw.php?i=84vJ6eWv from time to time – Mike Jul 23 '13 at 20:14