Unix tail equivalent command in Windows Powershell

后端 未结 13 1741
攒了一身酷
攒了一身酷 2020-11-28 00:13

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

13条回答
  •  孤街浪徒
    2020-11-28 00:44

    Very basic, but does what you need without any addon modules or PS version requirements:

    while ($true) {Clear-Host; gc E:\test.txt | select -last 3; sleep 2 }

提交回复
热议问题