Re: linux 'find' command
by Simon at 09:35 09/08/05 (Forum::Technical Advice::General)
I think Hugo meant to say -v rather than -e to invert the match sense.

Just to add to what Hugo said - piping commands together is something I do all the time, especially with greps, when analysing logs. eg:

cat /var/log/httpd/access_log | grep -v my.ip.address | grep 'GET /some/path/script.cgi' | grep ' 500 ' > ~/my.output.log

... which would extract all the server error lines for script.cgi apart from those from my.ip.address and put them in a file in my home directory. Note that this could also be written as:

grep -v my.ip.address /var/log/httpd/access_log | grep 'GET /some/path/script.cgi' | grep ' 500 ' > ~/my.output.log

... to avoid the unnecessary cat.
--
simon

<< CafePress for the UK (again) Trivial, I thought. >>
Powered by
Powered by Novacaster