How to open the tail of 8 GB log files using Notepad++ in Windows?
Solution 1:
You can use the PowerShell 3 command: Get-Content yourfile.log -Tail 100
Solution 2:
I'll confess to having used 7Zip to occasionally work around huge files. Here's how:
- Install 7-Zip. You probably want this anyway.
- Right click the giant log file.
- Select 7-Zip -> Add to archive...
- Change "Archive format" to tar
- Change "Split to volumes, bytes" to 650M or whatever size you want the chunks
- Click OK - It should generate a bunch of files with the same name but ending in .tar.001 and .tar.002
- 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.
Solution 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.
Solution 4:
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.