Sean Mackert professional headshot

Sean Mackert

- Passionate about security
- Aspiring red teamer
- Seeking mentorship

1-Minute Read

This one-liner is really handy for watching logs from a program that produces a new log file on restart.

gci 'C:\Users\IEUser\AppData\Local\Your Program\logs\*.log'| sort LastWriteTime | select -last 1 | Get-Content -Wait

Get-Content -Wait is the PS equivalent of watch(1).

WARNING: This sometimes hangs when left running in the background. At least it does in my VM. Pressing any key will cause it to catch up.

Recent Posts



Sean Mackert is an IT professional passionate about security and helping inform others.