Page is a not externally linkable
- Hardware and OS Related Technologies
-- Linux, Unix, and *nix like Operating Systems
---- Merge Log Files (txt format)


wheel - 2:10 pm on Dec 15, 2009 (gmt 0)


The stuff you can do from the command line in linux is crazy. The difficult part is knowing the commands :).

Doing search and replace/text finding type of things are crazy easy.

I'm no expert but I routinely use the two following:
grep -R string *
which looks recursively for 'string' in every file, down into the directory structure. Looking for a bit of code? just type that at the top of the directory and it'll find it for you.

The other one I use is a search and replace:
perl -p -i -e 's/stringa/stringb/g' *
which replaces all occurrences of stringa with stringb. (I think this is called the perl 'pie' or something like that).


Thread source:: http://www.webmasterworld.com/linux/4043224.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com