Question:
I have a powershell tab that I would like to run a command on and have it start scrolling the contents of a log file as it is updated. I don’t want it to exit (until I ctrl+c) and just continue scrolling the file as it is updated. How would I do this?
I’ve thought of using a file watcher but I would have to program the logic for determining the lines added and it just seems overall inefficient and like there’s an easier way to go.
Answer:
You can do:
1 2 |
get-content file -wait |