13

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.

14

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

  • 1
    Worked great! -TotalCount is how to get the head. – ShawnFeatherly Apr 9 at 5:50
4

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.
  • You can basically choose any compression algorithm that lets you choose a compression level of 0 or rate of 0%. – Martin Hennings Feb 13 '17 at 12:15
1

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.

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.

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

-1

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

tail -200 "myfile.txt" > tempfile.txt
  • 1
    They stated they are running Windows. Tail is a Linux command, is it not? – CharlieRB May 7 '14 at 11:53
  • 2
    Well, it is, originally. But you can use GNU Utils for Wi32. Then you will have tail command in your windows environment. See this thread – Art Gertner May 7 '14 at 11:56
  • 1
    For your answer to be complete & useful, you should edit it to include those details. – CharlieRB May 7 '14 at 11:57
  • @CharlieRB, it is not my answer. I will leave it for user1889665 to make those edits – Art Gertner May 7 '14 at 12:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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