tail command for Windows (650 Views)
Honored Contributor
Posts: 615
Registered: ‎11-14-2008
Message 1 of 6 (650 Views)

tail command for Windows

Good Day...

Would like to share you an idea, hope this would be helpful to you...


While checking System.txt file on windows nodes thru ovpdeploy, it would be better if we had a tail command similar to unix/linux. but windows never provide the unix/linux equivalent of tail command.


Any ideas on this - tail command equivalent on windows?!?!

HP Expert
Posts: 1,725
Registered: ‎07-31-2002
Message 2 of 6 (642 Views)

Re: tail command for Windows

Search baretail. Believe there is a free version of baretail too.
HP Software Rocks!
Honored Contributor
Posts: 641
Registered: ‎04-21-2011
Message 3 of 6 (640 Views)

Re: tail command for Windows

Hope the below link would help you ..



- Vidyasagar Machani -

Tell me and I forget. Teach me and I remember. Involve me and I learn. -- Benjamin Franklin
Honored Contributor
Posts: 615
Registered: ‎11-14-2008
Message 4 of 6 (635 Views)

Re: tail command for Windows

I was looking for direct steps (without installing any new tools) for quite sometime and all google searches didnt yield good results, including stockoverflow.. (i used to think that no questions will go out of stockoverflow unanswered ;) ) but that Stockoverflow post gave me some tips. a vb script idea. but i found my own idea instead of that vb script.



1. Find out the number of lines on a required logfile using windows find command.
find /c /v "" System.txt will give us the total number of lines on the given file.


MGMT_SVR# ovdeploy -cmd 'find /c /v "" "C:\Program Files\HP OpenView\data\log\System.txt"' -host <managed-node>



2. Windows "more" command gives an idea "more +f System.txt" --- will be equivalent of tail -f System.txt

since that system.txt file got 1539 lines, i want to see last 100 lines only:

MGMT_SVR# ovdeploy -cmd 'more +1439 "C:\Program Files\HP OpenView\data\log\System.txt"' -host <managed-node>



Hope you like this one.. please let me know if arent. we will delete this post ;)


have a great day!!


Honored Contributor
Posts: 615
Registered: ‎11-14-2008
Message 5 of 6 (631 Views)

Re: tail command for Windows

Thanks Ram and Vidyasagar, will learn these ideas as well..
kudos given..

please let me know if the above idea is not good
HP Expert
Posts: 289
Registered: ‎06-01-2012
Message 6 of 6 (620 Views)

Re: tail command for Windows



You can also use powershell example:





Hope this information helps.


Thanks and Regards,

Carlos Pinto


HP Support

If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.

If you liked it I would appreciate KUDOs.

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.