Skip to content

Instantly share code, notes, and snippets.

@lcomino
Created October 7, 2019 12:12
Show Gist options
  • Save lcomino/d4997c9a6fd77a22f24c28b6da36e57b to your computer and use it in GitHub Desktop.
Save lcomino/d4997c9a6fd77a22f24c28b6da36e57b to your computer and use it in GitHub Desktop.
Acompar log no Windows com Powershell
- Para checar as ultimas X linhas do arquivo
Get-Content SEU_ARQUIVO –Tail 30
- Para verificar o arquivo todo em tempo real (lento, pois lê o arquivo inteiro antes de chegar na última linha :/)
Get-Content SEU_ARQUIVO –Wait
- Para filtrar :) muito útil
Get-Content SEU_ARQUIVO -wait | where { $_ -match “CRITICAL” }
- Para checar o log em tempo real mas sem ler todo o arquivo
Get-Content SEU_ARQUIVO -Tail 30 –Wait
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment