Monday, August 20, 2012

Tail for Windows?

You would agree that linux's terminal and window's cmd.exe are not comparable things, there are a lot of things which are not available in cmd and one of those missing things is the tail utility which I find very useful to watch updates in debug log files.
Here are two solutions I use to get the same functionality on Windows.


In the power shell you may use the "Get-Content" command, here is how:
Get-Content -Path "c:\path\to\your_log_file.txt" -Wait
I could be too picky about this but the PS's syntax is much different from linux's terminal and I don't like it at all.


The other solution is to download and install the Windows Server Resource Kit. After installing the only thing you need is to set PATH variable (Control Panel > System > Edit the system environment variables) to the directory where the Kit was installed to and you may use tail utility in a common Command Processor.
C:\>tail -f "c:\path\to\your_log_file.txt"

No comments:

Post a Comment

Popular Posts