Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Log files and other textual data files are often tens or hundreds of megabytes in size, and some editors choke when you try to open something so large.

What are some good applications for viewing large files? Bonus points for apps that can open compressed files, search for things with regular expressions, parse output lines, etc.

share|improve this question
add comment

22 Answers

up vote 23 down vote accepted

Vim can handle most things pretty well (and gvim is a graphical version). You may want to use this script or this tip if you do a lot of this. But of course vim is not for everybody.

And then of course there is the command line approach. For viewing and basic searching within a file less) works well. For more complex searching you can use grep (or egrep or fgrep). To just see the top or bottom of the file you can use head and tail. It is well worth learning these tools if you do any serious text processing, they can make life much easier.

For compressed files you can use zless, zgrep, zegrep, zcat, zipgrep ...

These should be standard on Linux, Mac OS X and other *nix. For windows use the cygwin package.

Finally google found me this discussion on the joel on software board

share|improve this answer
3  
A note when using vim, make sure you turn off syntax highlighting (:syn off) if viewing a really large file. It speeds things up a lot. –  Kamil Kisiel Oct 3 '09 at 3:18
1  
use tail -f to "follow" a growing log file –  Shawn Aug 9 '11 at 13:54
add comment

For Windows, I've had great success with UltraEdit32.

share|improve this answer
    
Another vote for UltraEdit. I normally use Scite, but when I need edit a very large file, I use UltraEdit because, as their product page says, they use "Disk-based text editing and large file handling - supports files in excess of 4GB, minimum RAM used even for multi-megabyte files". I've opened 2GB files in UltraEdit with only a slight delay. In Scite, that'd take minutes. –  Nathan Bedford Apr 30 '09 at 20:59
    
UltraEdit (or UEStudio) is -very- snappy with very large files, so +1 for this. It's also by far the best and most feature-rich text editor of the many I've tried. Regex search/replace (including multiple files), column mode (great for log files!), etc. –  AR. May 13 '09 at 22:47
1  
with line-numbering off, its much faster. –  djangofan Aug 6 '09 at 23:14
add comment

TextPad is my weapon of choice for all text files.

Amoungst many other features it supports very large files and regular expressions

share|improve this answer
    
+1, I like textpad, it my text editor of choice at work. –  pipTheGeek Jun 3 '09 at 21:38
    
Working in a locked down hellhole and can't download and install software but found a server with textpad installed. Thanks for the tip! –  Gaz Davidson Oct 28 '13 at 11:26
add comment

Notepad++ is great. Almost instantly opens large files, supports regexp searching, context sensitive formatting, tabs, macros. Not sure if it'll open compressed files but there might be a plugin to do that.

share|improve this answer
1  
BTW, I just tried opening a 430MB file in the latest version Notepad++ and got this message: "File is too big to be opened by Notepad++". –  Nathan Bedford Apr 30 '09 at 21:12
    
There is no Refresh/Revert Key shortcut available by default in Notepad++ which is a problem whe you are looking at log files and want to refresh the content. –  Julien Nephtali Jun 3 '09 at 19:17
1  
From Notepad++ page: "Notepad++, a source code editor and MS Windows Notepad replacement, has the mission to offer a greener environment. By optimizing its routines, it results in reducing CPU power consumption then reducing the world carbon dioxide emissions." Save the planet! Use Notepad++! –  JohnyD Oct 19 '09 at 14:13
3  
On second thought, the latest version just choked trying to open a 245MB text file. Disregard my comment above and continue destroying the planet. –  JohnyD Oct 19 '09 at 14:20
add comment

I use GNU tools. Use 'less' just to browse large files. Use 'grep' to search with regular expressions.

share|improve this answer
add comment

"zcat | less" can usually handle most compressed log files you throw at it. Combined with grep and you can parse pretty much anything though it.

share|improve this answer
2  
with less the capitol F is nice to makes less act like tail if the log file is still growing –  trent Apr 30 '09 at 20:38
7  
instead of zcat | less , you could just use zless –  Hamish Downer Apr 30 '09 at 21:11
    
Oooh nice thanks, wasn't aware of that. –  Adam Gibbins Apr 30 '09 at 21:21
    
Bash completion can also recognize when you want zless versus regular less. It's very sweet. –  jldugger Apr 30 '09 at 21:49
1  
or better yet, install lesspipe (if it doesn't come by default with your copy of less) and add "eval $(lesspipe)" to your .bashrc or /etc/profile. then you can just run "less foo.tar.bz2" and let lesspipe figure out how to transform the input file(s) into plain text viewable by less. –  cas Aug 13 '09 at 4:12
add comment

The viewer in Total Commander, called Lister, easily opens gigabyte-sized text files. You can't edit them though - for that I'd recommend Notepad++.

share|improve this answer
add comment

I'm a little late to this party, but for viewing large files (or active log files) I use Baretail from Bare Metal Software. It is a gui tail program for windows.
It has useful features, like:

  • simple syntax highlighting (eg show "Error" with yellow font on red line)
  • copy selected text to clipboard
  • Open several files at once
  • Follow updating log file, or browse what has come before and easily follow end again
  • Store configuration in INI file or registry (nice when you use several different computers for the same tasks)
  • Huge files load at once, as compared to the load time of a the same file in a text editor. Quitting a file is at once as well.

Annoyances:

  • Splash screen advertising commercial version (I dont mind but ymmv)
  • No line numbers

I place a link to it in the "send to" directory where I can use it as a shell extension to Windows Explorer.

share|improve this answer
    
+1 This will come in handy for tailing log files on Windows. –  John Gardeniers Jun 16 '10 at 3:27
add comment

GigaEdit is good for big Text File and open the file very fast, no problem for files > 2 GB and GigaEdit is portable, no installation needed, but no undo function.

share|improve this answer
add comment

I love UltraEdit and use it all the time. I'm still using an older version, 6.00b, but it works fine for everything I need.

  • It's fast
  • It handles large files effortlessly
  • It handles and converts unix and dos end of lines
  • It has a hex mode so you can look at binary files when you need to
  • It has simple column editing
  • It has macros that can be recorded easily or edited if you need something more complex

I'm sure VIM and Notepad++ can do all of these, but I'm used to UltraEdit and have never had any reason to look at the others. We bought a 20-user license years ago for the company but it's now only used by myself and other admins, so it ends up on our PCs, on many of the servers.

share|improve this answer
add comment

I use most most of the time, especially more than less. (pardon my delight in that great pun).. but really, use most with appropriate the combination of zcat and grep and tail and head.

share|improve this answer
1  
I tried finding a link for most but ultimately failed. Can someone add one if they find one? –  Good Time Tribe Oct 3 '09 at 2:01
    
most homepage - pretty minimal. Also see the man page and a (currently) minimal wikipedia page. –  Hamish Downer Jun 21 '10 at 21:29
add comment

For Linux/Unix, I've found NEdit to be a good graphical editor for this (a lot better than e.g. gedit).

It's more approachable than e.g. Vim or Emacs, but still has a very powerful set of features.

share|improve this answer
add comment

On Windows I use Boxer for all my editing. I started with it back in the days of DOS and have never had a real reason to change. It has all one would expect of a modern editor, sych as regex, syntax highlighting (and you can create syntax files for any file type you like if it isn't already included), etc. There are a lot of advantages to always using the same editor, whichever that may be.

share|improve this answer
add comment

I faced the same issue and was trying to open the log files on a server. I can't actually install the different applications in the server for an alternative way of viewing log files. So I managed to open the log files from my local desktop using V - The File Viewer which has a 60 days trial version and have to buy it after that.

share|improve this answer
add comment

I've used XVI32 on occasion for many years now. It's free, doesn't require installation, and it is very fast.

share|improve this answer
add comment

If it is an XML file, XMLMax will load any size XML file and always in a treeview at over 1 GB per minute. Incremental loading begins display almost instantly. AND it is a true XML editor.

share|improve this answer
add comment

I like Notepad2, it's lightweight and it can handle large files.

share|improve this answer
add comment

On Windows there are viewers that are much faster (practically instant) in opening and use than the text editors that may take several seconds to open. And UltraEdit can be too slow in navigating around in the file if the large file contains long lines.

The file can also be displayed in hex (e.g. for checking the true line ending character sequence - UNIX/Windows/Mac).

Some descendants of Norton Commander, Total Commander and FreeCommander, have such viewers. FreeCommander uses Universal Viewer.

Universal Viewer can also be downloaded and used independently. It integrates into Windows Explorer so a file can be viewed directly through the context menu. However it does hijack the keyboard shortcut ("u") in the context menu from UltraEdit. As for bonus points Universal Viewer does have regular expression search.

share|improve this answer
add comment

I use vim in Linux - GVim Graphical version TextWrangler and vim in Mac OS X Notepad++ in windows

share|improve this answer
add comment

My vote is for Notepad++ as an all-round text editor. Handles large files, regex, etc. I don't think it's ever choked on anything I've ever thrown at it.

Besides, it's Free & Open Source!

-Waldo

share|improve this answer
add comment

You can use OtrosLogViewr. It can open log from compreseed logs from remote systems (sftp, samba) and have regular expression searching/filtering.

share|improve this answer
2  
When you advertise your own product it is customary to include a disclaimer. We like to be honest around here... –  Holger Just Jun 25 '11 at 17:46
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.