Buffered files (for faster disk access)

Windows file caching is very effective, especially if you are using Vista or later. TFileStream is a loose wrapper around the Windows ReadFile() and WriteFile() API functions and for many use cases the only thing faster is a memory mapped file. However, there is one common scenario where TFileStream becomes a performance bottleneck. That is … Read more

How to force Logstash to reparse a file?

By default logstash writes the position is last was on to a logfile which usually resides in $HOME/.sincedb. Logstash can be fooled into believing it never parsed the logfile by specifying /dev/null as sincedb_path. Here the part of the documentation Input File. Where to write the since database (keeps track of the current position of … Read more

Batch files: How to read a file?

Under NT-style cmd.exe, you can loop through the lines of a text file with FOR /F %%i IN (file.txt) DO @echo %%i Type “help for” on the command prompt for more information. (don’t know if that works in whatever “DOS” you are using)