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:

RE: File Uploads: WebCat/SiteEdit (1998) Secure server question (1997) possible, WebCat2.0 and checkboxes-restated (1997) attachment (2000) serial number dishing (1997) 2nd WebCatalog2 Feature Request (1996) command parameters (1998) WebCatalog/Mac 2.1b2 New Features (1997) NT version and O'reily's WebSite (1997) stuck time (1998) Warning: Mac OS X 10.2.4 Update Overwrites Apache's (2003) my price won't move (1997) dos performance (1998) Using WC for Bulk Emailings (1997) Latest version? (2000) Protecting webdelivery (1997) Locking up with WebCatalog... (1997) Formatting an embedded search from a neebie (2000) PCS Emailer's role ? (1997) quotes and truncating? (1997)