Need to search all files for string - strings command?
I need to search all files on a server for certain string. I've been told the strings command would be best. I need it to search all files in all directories.
I'm thinking of using the strings command that can do a directory, within a script that does all directories. I have been a linux user for a while but my scripting and skills are not great. Thanks |
The grep command may do what you want. See:
man grep ------------------------ Steve Stites |
It has to search binary also.
Like say my company has been bought and the old company was called "abcd". Abcd may be in any program file or script. I need to find them all. I'm experimenting with the strings command, and this will search all files in the current directory for the word "program" and will print the file name. I don't yet know if it's searching all types of files. strings -af -n 7 * | grep program |
An excerpt from the grep man page
Quote:
Code:
find / -type f -print 0 | xargs -0 grep <pattern> |
Look at sed -i.
ta0kira |
All times are GMT -5. The time now is 10:10 PM. |