views:

11084

answers:

28

I have a program that creates daily log files that are 30-60MBs in size. I often need to open these files and search for various events. Notepad.exe takes a very long time to open a file that large. I've tried various shareware programs, some are better than notepad, but they all take a while to load these log files. I'm guessing part of the problem is these programs are designed as text-editors. If a program was designed strictly as a text viewer, it could probably handle large files more gracefully (i.e. not have to load the whole file on startup).

Does anybody have any recommendations for a notepad replacement that will allow me to view these files quickly?

A: 

Any of the Visual Studio Express editions should achieve this feat, though not very efficiently if the text is one long line.

Jeff Yates
There's an understatement! VS will lock up and/or crash on large files *unless* you're careful to keep line length short; i never use it for large files unless i've first opened and reformatted them elsewhere.
Shog9
I've never experienced it crashing for large single line files, but it does lock for some time while it loads it, that's for sure.
Jeff Yates
To be fair, i'm pretty sure it ran out of address space before crashing. Avoid trying to open a 40MB, one-line XML file...
Shog9
+17  A: 

NotePad++ can handle big file.

Daok
However, you gotta make sure to turn off syntax highlighting before opening large files.
Pumbaa80
Really? NP++ can't handle even moderately large files (~300 MB). Trust me. Look at the internals if you don't believe me.
Alex
The OP's spec is for 30-60 MB. NP++ can handle such files without issue.
Matt Ellen
+1  A: 

I once tried to open a >1GB file in NotePad++... no dice. For your purposes NotePad++ should do it, but in the event you ever need to open anything bigger: Vim was able to do it just fine.

There is a Windows version here:

http://www.vim.org/download.php

mmacaulay
+2  A: 

I use V - File Fiewer

It's a $20 shareware program and I use it on log files that are in excess of 1 gigabyte of text. It's a read-only file viewer. It launches fast because it only opens a portion of the file at any one time. I use it daily for quick searches.

Tracy Probst
+1 for V, an unknown gem of a program! I pretty much live in that program. It views files in hex and "flat binary" as well as text mode and a huge number of other options.
Todd
+1  A: 

SciTE is able handle large text files quite easily.

Patrick Cuff
It does better than VS or Notepad, but excessive line lengths still cause problems if you actually want to edit.
Shog9
+29  A: 

TextPad. As per the specs, it can handle file sizes up to the largest contiguous chunk of virtual memory.

If you are looking for a file viewer, try Large Text File Viewer

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

Gulzar
Can't vouch for the others but TextPad has been in my arsenal for longer than I care to admit. It's not free but at less than $30, it's probably paid for itself many times over by now.
belugabob
Textpad is awesome. I use that sucker everyday. the best part is the files you can download that colors the text depending on what the extension is
Miles
Textpad doesn't support UTF8. The docs say that it does, but it doesn't do it right. I've been burned by this a number of times. I just use gVim and avoid the hassle.
rmeador
I can attest to the value of Textpad, but it wasn't able to load my largest file. Large Text File Viewer seems to be working... but man... it is one annoying program!
TGnat
TextPad is great. All my university's computers have it and i'm hooked.
Simucal
+1  A: 

Wordpad can handle much larger files than Notepad, and it's already on your system.

Bill the Lizard
A: 

Notepad++ all the way

A: 

Many more recommendations can be found here.

itsmatt
+4  A: 

I really like notepad2. It's simple, small and works great.

chills42
If I recall correctly, notepad2 does *not* handle large files very well.
Ray Vega
I've had no problems up to 100-200 MB files... not bad for a ~250k program...
chills42
+1 for notepad2
snowcrash09
+2  A: 

Standard unix utils are my suggestion. You can get them on windows with cygwin.

less to page through large amount of text grep to find specific rows head or tail to limit the output from grep

John Nilsson
+1  A: 

As said in the question Best Free Text Editor Supporting More Than 4G Files?, "Large Text Viewer", does actually pretty much what it says it does ;) (on Windows)

  • No installation is needed.
  • The executable is only 568KB!
  • search features (regexp supported)
VonC
A: 

GetDiz. Also great for viewing ascii art

Midhat
+7  A: 

Please make sure you explore the search function on this website; this exact, as well as similar questions, have been asked before. See, e.g.,

Good luck!

onnodb
Pretty much the same but the link specify > 100 megs. This guy want just something for 30-60 megs. So other program can handle 30-60 megs and not 100 megs. That's why I won't close the question yet.
Daok
A: 

If you just want to view the file (not edit it): Total Commander, press F3. Blazing fast! You need to pay for Total Commander though.

Krzysztof Koźmic
A: 

Do you really need to "open" the file, maybe you should try "grep" or some other search utility that can display the lines you're searching for. http://www.google.com/search?&q=grep&btnG=Google+Search Hope this helps.

BoltBait
+1  A: 

Have you tried Perl? No, it isn't a text editor, but a quick perl script can allow you to search through your log file without ever having to load it manually. Here's how:

Download the latest Perl Build. If you're on Windows, download either 'Strawberry Perl' or 'ActiveState Perl'.

At that point, simply go to the command line and type the following command:

perl -ne '/yoursearchhere/ and print' yourfilename.txt.

When I was a system administrator, I would often use Perl to search through oppressively long log files. If your job involves dealing with text in any way, and you find yourself hunting for information all day, I'd recommend learning Perl. It will save you over the long run.

For instance, with Perl, you can:

Do a batch search and replace on all the files in your web directory based on a condition (in about 10 lines of code), break log files down into small, manageable sizes, and use it for just about anything else you can imagine you'd ever want to do with text.

George Stocker
I'm a big perl fan too, but the activity your describing is aptly covered by the GNU TextUtils now part of the GNU CoreUtils. Specifically `grep` and `sed`.
dlamblin
Yup. The only reason to advocate perl is because it is so versatile for so many uses (I'm wondering how many times I can use 'so' in a sentence'). For instance, I'm presently an ASP.NET Programmer, and I'm still finding uses for Perl. It's just a handy language to learn.
George Stocker
A: 

If you don't want to fetch a utility that doesn't ship with Windows, Wordpad handles large files text much better than Notepad does.

ephemient
+1  A: 

In my experience Notepad++ works only to a certain limit; after that it can garble the text on long lines or make scrolling to the bottom act very glitchy.

A long time ago I used to use Pepper for this purpose (very large files) and found it to work well.

Unfortunately it's a tad old so registering it hard to do.

dlamblin
A: 

Notepad2 solves both of your concerns. It handles large files better than most other text editors. I have been able to open files >200 MB in Notepad2. And the search functionality is pretty fast and powerful and allows advanced regex searches. On top of that it's pretty lightweight. And its free.

Nikhil
+1  A: 

I use UltraEdit. From the site's marketing spiel:

Disk based text editing and large file handling - supports files in excess of 4GB, minimum RAM used even for multi-megabyte files

It costs $49.95, but I've been using it for nearly 7 years now and it has definitely been worth it. You can download and use it for free for 45 days. If you're looking for a free or Open Source solution, you should look for a disk-based editor.

Also, if you have something like Cygwin or Windows Services for Unix installed, you could use the less viewer or something similar to view your logs.

braveterry
A: 

With ZTree you can easily search, view, copy selected text, etc. from very large files or multiple files.

Rob Kam
+2  A: 

EmEditor

Hosam Aly
I second that: see http://www.zdnet.com/blog/burnette/worlds-fastest-text-editor-gets-even-better/1994
VonC
A: 

Loading a large file into memory takes a long time. Try using an editor that displays from disk, it is faster on large file. It seams like you only want to view not edit the files so just use grep or something similar to filter and pipe to a file just the lines you want to see and only open that in a editor.

Gerhard
+1  A: 

Large Text Viewer is guaranteed to work - not sure about others like Notepad++, UltraEdit etc - do they open files more than 1GB in an instant?

Don't think so!

PoorLuzer
A: 

Along with Tracy Probst, I also use V the Fileviewer, http://www.fileviewer.com by Charles Prineas. It's $20 but worth far more.

I'm surprised more people don't know about this program, particularly programmers. It's a file browser and Windows Explorer alternative that views and opens files. I use it every day to view the contents and structure of all kinds of files. It views files in hex and "flat binary" as well as text, Unicode, EBCDIC if you need that, and lots of other options.

I initially came across V years ago when looking for a Windows version of Vern Buerg's old LIST program for DOS, which may give older programmers an idea of what kind of utility it is. I haven't come across anything that is closer to "LIST for Windows" than V.

I was interested in people's references to Large Text File Viewer so I tried it. It may open large files quickly, but it's excruciatingly slow scrolling and moving through them. V by comparison is lightning fast at opening and viewing.

I opened the LTF exe in LTF itself and it took a noticeable pause, and it's only 586K. Turning off the graphic background helped. Pressing Ctrl+PgDn to go to the end of the file took over a second. Opening the same file in V was instantaneous, as was jumping to the end. (Granted it was cached, but eyeball tests on larger files were just as fast).

I came to this thread by searching for "file viewer" and am astonished more programmers don't use a general purpose file viewer instead of text and hex editors, and I don't know why there aren't more such programs. We deal with files in a wide array of formats all the time. It makes sense to use a single program to browse and view and work with them instead of going in and out of an editor to do so, especially when you're not intending to edit them.

Todd
A: 

EmEditor works great for any size file. Opens and edits super fast, in my experience.

EJP