Re: OT: Unix Geek Needed

This WebDNA talk-list message is from

2005


It keeps the original formatting.
numero = 63535
interpreted = N
texte = On 12/1/05 1:05 PM, "John Peacock" wrote: > Clint Davis wrote: >> I have an ENORMOUS web log due to a 404 error looping. I can't open this in >> BBEdit or any other text editor because it's over 14GB! How can I remove all >> lines in this file that contain "404.html" via the command line? I'm not up >> on my grep, sed, awk, etc. > > First shut down whatever web service is logging to that file, then > > # mv logfile logfile.bak > # fgrep -v "404.html" logfile.bak > logfile > > ...some minutes later... > > Start up the web services again. The 'mv' won't take any time at all > because it doesn't copy the file, but merely rewrites the directory > itself (where the filename lives). The fgrep will be slow (the '-v' > means all lines which *don't* match the search term), but there is no > better way to do it. NOTE: fgrep is faster than grep because it only > deals with exact matches (and that includes capitalization). Thanks much, John! ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: OT: Unix Geek Needed ( "Chris List Recipient" 2005)
  2. Re: OT: Unix Geek Needed ( John Peacock 2005)
  3. Re: OT: Unix Geek Needed ( Clint Davis 2005)
  4. Re: OT: Unix Geek Needed ( John Peacock 2005)
  5. Re: OT: Unix Geek Needed ( "Chris List Recipient" 2005)
  6. Re: OT: Unix Geek Needed ( Clint Davis 2005)
  7. Re: OT: Unix Geek Needed ( John Peacock 2005)
  8. OT: Unix Geek Needed ( Clint Davis 2005)
On 12/1/05 1:05 PM, "John Peacock" wrote: > Clint Davis wrote: >> I have an ENORMOUS web log due to a 404 error looping. I can't open this in >> BBEdit or any other text editor because it's over 14GB! How can I remove all >> lines in this file that contain "404.html" via the command line? I'm not up >> on my grep, sed, awk, etc. > > First shut down whatever web service is logging to that file, then > > # mv logfile logfile.bak > # fgrep -v "404.html" logfile.bak > logfile > > ...some minutes later... > > Start up the web services again. The 'mv' won't take any time at all > because it doesn't copy the file, but merely rewrites the directory > itself (where the filename lives). The fgrep will be slow (the '-v' > means all lines which *don't* match the search term), but there is no > better way to do it. NOTE: fgrep is faster than grep because it only > deals with exact matches (and that includes capitalization). Thanks much, John! ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Clint Davis

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

multi-paragraph fields (1997) Webcatalog Future?!? (2000) AutoCommit Preference? (1998) Silly date question (2006) 1 database keeps getting messed up (2002) select multiple (1997) WebCat2b15MacPlugIn - [authenticate] not [protect] (1997) Mac Programs (1998) Emailer Error 550 (Was Strange Crash) (1998) Web Delivery Page concept (1997) bug in [SendMail] (1997) Help! WebCat2 bug (1997) [WebDNA] How to use [function] (2012) Emailer (WebCat2) (1997) Re:Dumb Question about Docs (1997) Page Showing 3 times (2000) Webmerchant confirmation hooks? (1997) Weird Math and SV Bad News (1997) Sendmail doesn't (was Queertrons?) (1997) WebCatalog Plug-in for Webstar. (1997)