Powershell Tip #16: Unix tail equivalent command (to monitor a file)

By | August 4, 2015

Tip: You can monitor the latest changes of a file (example: a log file with the latest logons).

Get-Content -Path 'C:\ProgramData\chocolatey\logs\chocolatey.log' -Tail 10 -Wait

-Tail 10 : to display the latest 10 lines of the file

-Wait : to see the updates in real time



Leave a Reply

Your email address will not be published.