30

How to open the tail of 8 GB log files using Notepad++ In Windows?

I used Notepad Document Monitor but don't quite get how to use it. I start monitoring and then what? How do I select the large file?

I can't just open the file because it's 8GB. So I got this large file 8GB log. I only want to see the tail. Like the last 100k lines, for example.

https://confluence.atlassian.com/pages/viewpage.action?pageId=321854547

says I should open the file.

The whole point of seeing only the tail is because the file is too large. I only want to see the tail.

user4951
  • 5,029
  • 27
  • 76
  • 111

9 Answers9

32

You can use the PowerShell 3 command: Get-Content yourfile.log -Tail 100

niutech
  • 1,126
12

I'll confess to having used 7Zip to occasionally work around huge files. Here's how:

  1. Install 7-Zip. You probably want this anyway.
  2. Right click the giant log file.
  3. Select 7-Zip -> Add to archive...
  4. Change "Archive format" to tar
  5. Change "Split to volumes, bytes" to 650M or whatever size you want the chunks
  6. Click OK - It should generate a bunch of files with the same name but ending in .tar.001 and .tar.002
  7. Open those files in Notepad++ or whatever you use to read files.

There are some downsides:

  • The first line of the first file will have some tar related garbage.
  • The files typically don't start/stop on newline boundaries.
  • Won't work if the file is being actively appended to.
Ryan
  • 251
4

Notepad++ now has a plugin called BigFile that works great for this. Once installed go to Plugins->BigFiles->Open BigFile.

https://github.com/superolmo/BigFiles

influent
  • 151
3

You can use Total Commander's file lister function (hotkey is F3) or standalone version which is available here: Lister standalon

The integrated file lister allows to view files of almost any size (up to 2^63 bytes) in text, Unicode, HTML, binary or hex format, bitmap graphics (bmp, jpg, gif, png), multimedia files, and now also RTF files. It keeps only a small part of the file in memory (except for bitmaps), the rest is automatically loaded when scrolling through the text.

Jessica
  • 51
  • 5
1

Use a hex editor such as HxD, they usually stream the hard drive instead of reading the entire file.

Select everything from top to bottom, then start deselecting upwards whatever you want to keep.

Delete everything you don't want (this may take a bit of time and a loading bar may appear, but shouldn't hang or get overloaded like Notepad++ would).

Then, you can open it in Notepad++, in case you don't require a more automatic solution.

Deji
  • 213
1

I would send the tail to a new file and open new file in notepad++.

tail -200 "myfile.txt" > tempfile.txt
1

You can use an dedicated data workbench, it's called Ankhor FlowSheet.

  • Install the package 'Display and Filter Large Texts'
  • Import the containing library LargeTextReader.flsx
  • Specify the path to your file
  • You GTextOpen to open it
  • Connect it with GTextView
  • Connect it with the Dashboard
  • Have fun scrolling trough the file !

There are many operators to filter, join or extract the required lines.

The best thing is, that you don't need 8gb of RAM to get the file into the view, the data will be 'streamed' through small chunks with almost no delay.

I myself was already able to look into an OSM data file with 43gb and more than 600 million lines...

The Community Edition of the application is free and should be suitable even for such tasks.

Screenshots of the FlowSheet:

Graph:

enter image description here

Dashboard:

enter image description here

0

This don't really answer your question but if you are going to look into huge files I have found the gun to be the only working editor http://www.movsd.com/thegun.htm homepage looks like crap and editor was written ages ago in assembler and have few features, but it works.

I also think baretail can handle those huge files but is not 100% sure, baretail is also a tailer and have some features like filters and such. (if you just want the end of the file I assume you are going to analyze logs, can't se any other sane situation) https://www.baremetalsoft.com/baretail/

Griffin
  • 354
0

Have a try with loxx which I developed by my own. I was using BareTail for a long time but was missing some features. It supports highlight-coloring very fast open / search operations etc.

Ramhound
  • 44,080
mommos
  • 1