tail -f equivalent on Windows

Posted by

As a longtime Linux guy, I always find myself looking for similar equivalents in the Windows space when I’m doing work over there. I tend to look a lot at the end of log files from my applications to see what’s happening. In Linux you can do something like:

This shows you the last few lines of “logfile” interactively. Meaning, that it will sit there and wait until “logfile” is appended to and it will then show you those lines. It’s great for monitoring something sticky deep inside an application if you don’t have tests you can generate and run.

An equivalent to “tail -f” on Windows is to use PowerShell with this command:

Another nicety in PowerShell “Get-Content” is that you can pipe the output to a search to only show the logfile lines that contain a specific string:

Happy tailing and Get-Contenting!

Leave a Reply

Your email address will not be published. Required fields are marked *