Finding
a String
How to find a string somewhere on the system? Many times we are called to search for a string, but we have no idea where it may be lurking. Judicious use of the find and grep commands will make you a hero with your co-workers. # find . -type f -exec grep "string or options" /dev/null {} \; Normally using only:
Produces the target string, but you will have no clue as to where it is located, making this almost as frustrating as using windoze! Remember when grep'ing against multiple files the filename will be listed before the match. $ grep there *
Have a Unix Problem
Unix Books :-
Return to : - Unix System Administration Hints and Tips (c) www.gotothings.com All material on this site is Copyright.
|