Our website would like to use cookies to store information on your computer. You may delete and block all cookies from this site, but parts of the site will not work as a result. Find out more about how we use cookies.

Login or Register

Powered by
Powered by Novacaster
 
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. >>
View Comments (Flat Mode) Printer Version
linux 'find' command Bruce Ure - 6/08
    Re: linux 'find' command Bruce Ure - 6/08
    Re: linux 'find' command David Crowson - 6/08
    Re: linux 'find' command Hugo van der Sanden - 6/08
       Re: linux 'find' command David Crowson - 6/08
          Re: linux 'find' command Hugo van der Sanden - 7/08
       Re: linux 'find' command Bruce Ure - 6/08
          Re: linux 'find' command Hugo van der Sanden - 7/08
             Re: linux 'find' command Bruce Ure - 8/08
                Re: linux 'find' command Hugo van der Sanden - 9/08
                   Re: linux 'find' command Simon - 9/08
                      Re: linux 'find' command Hugo van der Sanden - 9/08
             Re: linux 'find' command Rob Larsen - 4/08
                Re: linux 'find' command Simon - 7/08