Ideally this works :
find . -name "*.*" | xargs grep "MyTextToSearch"
But when you have spaces between the file names / folders - this doesn't works in few OS where GNU find is not installed.
In such case, on one of the Solaris Machine the following worked
find . -name "*.*" -exec grep -l "MyTextToSearch" {} \;
find . -name "*.*" | xargs grep "MyTextToSearch"
But when you have spaces between the file names / folders - this doesn't works in few OS where GNU find is not installed.
In such case, on one of the Solaris Machine the following worked
find . -name "*.*" -exec grep -l "MyTextToSearch" {} \;
No comments:
Post a Comment