I am looking for Powershell cmd to print the last 5 lines of data from any file in the directory.
Ideally
Get-Content -Tail 5 -Wait .\test.log
will print tail over the specific file from last 5 lines. If any new content is being appended to that file, it will keep printing.
Similarly, I want to tail over all the files from directory. Print the contents if any file is getting modified.
Tried something like this, didn't work!
Get-Content -Tail 5 -Wait .\folder*.log