23

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.

4

9 Answers 9

29

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

1
  • 2
    Worked great! -TotalCount is how to get the head. Apr 9, 2019 at 5:50
10

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.
3
  • You can basically choose any compression algorithm that lets you choose a compression level of 0 or rate of 0%. Feb 13, 2017 at 12:15
  • instead of using 7z, there are lots of tools to handle huge files efficiently. And there are the built-in tail-like commands so you don't need to go through so many steps
    – phuclv
    Dec 5, 2019 at 15:18
  • @phuclv You're right and I agree but can you be more constructive? Which tools do you recommend? Which built-in tail-like commands?
    – Ryan
    Dec 9, 2019 at 18:17
2

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
  • Standalone version is very slick for quickly scrolling through large files - mine was 20.5GB and it worked like a normal notepad on a laptop.
    – Steve
    Mar 1, 2022 at 20:49
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 was using BareTail for a long time, but it was missing features like filtering, time sync, line numbers, side by side view and so on ... so finally I wrote my own log-viewer: "Loxx". It is for Windows only and free of charge with a limited functionality, can read huge files, real time updates and much more.

A license is required for:

  • Saving changed files
  • Filtering of files
  • Any use of regular expressions or wildcards
  • Time synchronization between files

Here's a screenshot of the main window:

Please have a try — any feedback is welcome!

3
  • Ultra Edit can do this. Files can be any size so put on an SSD disk. You can then go to the end, select what you want and put it in a new file
    – John
    Dec 4, 2019 at 19:40
  • .... but I want to see a log in real time .. define stop triggers .. hide useless lines ... etc .. ... and I had a try with UltraEdit and a 70 GB test file ... still waiting for a response :-)
    – mommos
    Dec 4, 2019 at 20:03
  • The link is, of course, useful, but it would be better if you explained more of the features — and, specifically, what's free and what isn't.  Please do not respond in comments; edit your answer to make it clearer and more complete. Dec 4, 2019 at 20:59
0

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

tail -200 "myfile.txt" > tempfile.txt
4
  • 1
    They stated they are running Windows. Tail is a Linux command, is it not?
    – CharlieRB
    May 7, 2014 at 11:53
  • 3
    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 May 7, 2014 at 11:56
  • 2
    For your answer to be complete & useful, you should edit it to include those details.
    – CharlieRB
    May 7, 2014 at 11:57
  • @CharlieRB, it is not my answer. I will leave it for user1889665 to make those edits May 7, 2014 at 12:03
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/

0

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

1
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Nov 23, 2021 at 20:37

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.