Created
October 7, 2019 12:12
-
-
Save lcomino/d4997c9a6fd77a22f24c28b6da36e57b to your computer and use it in GitHub Desktop.
Acompar log no Windows com Powershell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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