Read large text files like 3GB in size.

Discussion in 'Mac Apps and Mac App Store' started by GRMrGecko, Jun 4, 2009.

  1. GRMrGecko macrumors member

    GRMrGecko

    Joined:
    Jun 7, 2008
    Location:
    Nowhere and everywhere
    #1
    I have an access log that I need to read and it is 3GB in size. Any application that can read that? Maybe Hex Edit.
     
  2. northerngit macrumors member

    Joined:
    Jul 16, 2007
    Location:
    England
    #2
    I'm not sure about GUI applications - however I would suggest you look at the Terminal commands:

    less / more
     
  3. rowsdower macrumors 6502

    Joined:
    Jun 2, 2009
  4. GRMrGecko thread starter macrumors member

    GRMrGecko

    Joined:
    Jun 7, 2008
    Location:
    Nowhere and everywhere
    #4
    That gave me this error, (MacOS Error code: -116)
     
  5. rowsdower macrumors 6502

    Joined:
    Jun 2, 2009
    #5
    I'm not sure what that means. I've opened some large files in TextWrangler, but maybe not quite that large.
     
  6. miles01110 macrumors Core

    miles01110

    Joined:
    Jul 24, 2006
    Location:
    The Ivory Tower (I'm not coming down)
    #6
    There's really no good way to do this; any program you use is going to take forever to open it. Like... hours possibly. I'd try a built-in text editor like nano or emacs.
     
  7. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #7
    I'd recommend splitting the file into smaller ones. Using terminal you can use the split command.

    Code:
    split -l 100000 largeFile.log split_
    This will split the file into files of 100K lines per file. I haven't tried it out though. The last piece is the prefix for the split-named files e.g., split_001.
     
  8. GRMrGecko thread starter macrumors member

    GRMrGecko

    Joined:
    Jun 7, 2008
    Location:
    Nowhere and everywhere
    #8
    Great idea, I never knew of that command.
     
  9. Mitthrawnuruodo Moderator emeritus

    Mitthrawnuruodo

    Joined:
    Mar 10, 2004
    Location:
    Bergen, Norway
    #9

Share This Page