Computer Hope

Software => BSD, Linux, and Unix => Topic started by: pankajgarg on March 17, 2009, 10:55:01 PM

Title: viewing large file
Post by: pankajgarg on March 17, 2009, 10:55:01 PM
hello all,

i have  a very large text file to open (almost 4gb) ...i tried to open in windows but cant open that much big file...so i wanna know can i open in linux or if i can see some of the data from that file....if yes lemme know the procedure and the commands...

thanks & regards,
pankaj
Title: Re: viewing large file
Post by: ghostdog74 on March 18, 2009, 12:13:51 AM
use the more command to view the file page by page. if you want to find some text in the file or do something with the file, use awk.
Title: Re: viewing large file
Post by: Computer Hope Admin on March 19, 2009, 12:26:40 PM
Granted I've never tried a 4GB file, I'd imagine a more sophisticated program should still be able to open it. I've opened several hundred meg to 1GB files in Textpad (http://www.textpad.com/), my favorite Windows text editor.

Just curious what type of data is consuming 4GB?
Title: Re: viewing large file
Post by: Dias de verano on March 19, 2009, 03:20:40 PM
Large Text File Viewer 5.0

This program was designed for viewing large (>1GB) text files. It uses little memory and is able to open a gigabyte file instantly.

Free.

http://www.topshareware.com/Large-Text-File-Viewer-download-11000.htm
Title: Re: viewing large file
Post by: Computer Hope Admin on March 19, 2009, 03:21:25 PM
Nice suggestion.  ;D
Title: Re: viewing large file
Post by: ghostdog74 on March 19, 2009, 07:57:51 PM
@OP , if you want to view  a large file in *nix, you can use vim. from the vim faq
Quote
Maximum file size      2147483647 bytes (2 Gbyte) when a long integer is
            32 bits.  Much more for 64 bit longs.  Also limited
            by available disk space for the |swap-file|.
Title: Re: viewing large file
Post by: CG59 on March 26, 2010, 07:59:24 AM
Dear All,

there's an OpenSource project allowing the display of large files. It is written in Java language: you can find it at http://sourceforge.net/projects/largefileviewer/

There's a user manual.

I tried it with a 1.8GB text file without any problem but you have to use parameter -XmxMEMORY_SIZEm when you launch the program. For instance:

java -Xmx700m -jar LargeFileViewer.jar BigFile.txt

I never tried with a 4GB file size, in this case the -Xmx700m must be replaced by a bigger value.

I heard about some limitations with the JVM heap space (2GB, but must be checked).

Hope this will help you.


Best Regards.
 ;)
Title: Re: viewing large file
Post by: ghostdog74 on March 26, 2010, 08:03:20 AM
gosh, Java. now i wait for the program to startup, while i sip coffee. :)