PDA

View Full Version : Editing Large Txt Files (100mb)



Johnsie
February 18th, 2009, 01:14 PM
Hi, I'm trying to open a 100mb text file to see how many lines there are in it.

Gedit doesn't handle things too well (probably because I only have 500mb ram). Can anyone suggest a text editor that would help me do this or another way to find out how many lines are in the text file?

Thanks,

John

Johnsie
February 18th, 2009, 01:51 PM
Nevermind, I got someone in the data department to do it using Visual Fox.

Kvark
February 18th, 2009, 02:23 PM
Quickest way to count the lines in a text file, so you know for next time:

wc -l file.txt
You can also do wc -w to count number of words and wc -m to count number of characters. Just wc file.txt without options prints 3 numbers without explanation, the first is lines, the second is words and third is file size in bytes.

Johnsie
February 18th, 2009, 03:12 PM
Nice, I ran that and it worked almost instantly.

+1 for Linux

rax_m
February 18th, 2009, 03:19 PM
Also, if you ever do need to actually open such a large file, I find the vi works great (or cream, if you're looking for a gui version).