grep -r "stringToSearchFor" directoryToBeSearched
Doing some work on Solaris where the "-r" flag is not an option. To do this on Solaris:
/usr/bin/find . | /usr/bin/xargs /usr/bin/grep "patternToSearchFor"
or if your paths are defined simply:
find . | xargs grep "patternToSearchFor"
~Fin
Too often I figure out how to do this or that on Linux systems and in my haste to complete whatever task I've been assigned this "How To" knowledge gets lost. So here, I will begin posting little odds and ends in hopes of not needing to re-research past efforts for Linux tips, tricks, hacks, and other good to know things. If you find yourself here and know of smaller, faster, better ways of doing any of this please let me know - only through cooperation can we all get better.
Showing posts with label Solaris. Show all posts
Showing posts with label Solaris. Show all posts
Monday, October 12, 2009
Subscribe to:
Posts (Atom)