Linuxtailでログをリアル表示させるのは非常に便利なのですが

WindowsではPowerShellのコマンドGet-Contentにtail機能があります。

 

↓下記コマンドです

Get-Content -Wait -Tail 20 -path "c:¥test.log" -Encoding UTF8

Windows 11の「Windows Terminal」を開くと↓

Windows 11の「Windows Terminal」

PowerShellになっています↓ので先程のコマンドを入力しエンターします。

PowerShell画面

ログが追記されると更新された内容がPowerShell上で表示されます。

-tail 20は表示行数です。

 

 

 

 

 

 

Get-Content -Wait -Tail 20 -path PowerShell