I have to look at the last few lines of a large file (typical size is 500MB-2GB). I am looking for a equivalent of Unix command tail
for Windows Powershell. A f
Just some additions to previous answers. There are aliases defined for Get-Content, for example if you are used to UNIX you might like cat
, and there are also type
and gc
. So instead of
Get-Content -Path -Wait -Tail 10
you can write
# Print whole file and wait for appended lines and print them
cat -Wait
# Print last 10 lines and wait for appended lines and print them
cat -Tail 10 -Wait