Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Compress txt file

Options
  • 03-09-2007 2:59pm
    #1
    Registered Users Posts: 1,552 ✭✭✭


    I have a .txt file that has grown to 1gb in size.
    I need to find a way or compressing it and searching through it.

    What would be the best way to compress it?

    Should I zip it or compress it to a .rar file?


Comments

  • Registered Users Posts: 7,541 ✭✭✭irlrobins


    If it's a plain text file then you probably can't compress it much more. And if you zip it you'll still have to extract it to view/search it.

    I use baretail to view large files.


  • Registered Users Posts: 1,552 ✭✭✭quinnd6


    Whoops sorry its actually a .log file


  • Registered Users Posts: 7,541 ✭✭✭irlrobins


    That's just the file extension. It's probably a plain text file.


  • Closed Accounts Posts: 198 ✭✭sh_o


    irlrobins wrote:
    If it's a plain text file then you probably can't compress it much more. And if you zip it you'll still have to extract it to view/search it.

    I use baretail to view large files.

    With respect, plain text files are great for compressing, they will compress very well!
    For large text log files, I use gzip on a linux environment to compress the files. I can then search the compressed files using zmore filename | grep searchstring

    compressing log files will normally really give great results, see for example this apache log file compression:
    [sh@www tmp]$ ls -l access_log
    -rw-r--r-- 1 shane shane 62166579 Sep 3 16:18 access_log
    [sh@www tmp]$ gzip access_log
    [sh@www tmp]$ ls -l access_log.gz
    -rw-r--r-- 1 shane shane 3746946 Sep 3 16:18 access_log.gz


  • Registered Users Posts: 7,541 ✭✭✭irlrobins


    Ignore what I said, I'm talking bollix. :rolleyes:


  • Advertisement
  • Registered Users Posts: 1,552 ✭✭✭quinnd6


    Im using windows so I think Ill zip it.

    thanks anyway


  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 91,707 Mod ✭✭✭✭Capt'n Midnight


    If using windows, you are probably using NTFS, right click the file or folder and change the compress attribute, transparent , the OS does all the work.

    http://www.7zip.org beats winzip , you can also use 7za.exe at the command prompt

    also 7zip includes source code if you want to do some programming


  • Closed Accounts Posts: 1,444 ✭✭✭Cantab.


    If using windows, you are probably using NTFS, right click the file or folder and change the compress attribute, transparent , the OS does all the work.

    http://www.7zip.org beats winzip , you can also use 7za.exe at the command prompt

    also 7zip includes source code if you want to do some programming

    I'll second 7-zip. Can't stand that WinZip 'use evaluation version' lark.


  • Registered Users Posts: 7,468 ✭✭✭Evil Phil


    I'm a winrar man myself.


Advertisement