Essential Linux and Windows Log Commands for Troubleshooting
Classified in Technology
Written on in
English with a size of 3.49 KB
Terminal and Log Command Examples
grep -i system /etc/passwd
grep -i ubuntu /etc/passwd
grep -i '*ubuntu*' /etc/passwd
grep -i "sync$" /etc/passwd
grep -E 'info|warn' /var/log/*log* && history | tail -n 2
Windows
findstr "*error*" C:\Windows\Logs\CBS\CBS.log
Select-String -Path "C:\Windows\Logs\dism\dism.log" -Pattern "2024-04 Manager"
findstr "^2024-01 | Manager" C:\Windows\Logs\DISM\dism.log
findstr /S /I /N "failed" C:\Windows\Logs\*.log
Get-EventLog -List
Get-EventLog -LogName System -Newest 25 | Format-List
wevtutil qe System /c:200 /rd:true /f:text | findstr /i "kernel"
wevtutil qe System /q:"*[System[TimeCreated[@SystemTime>='2023-09-01T00:00:00.000Z']]]" /f:text | findstr /i /c:"ProviderName: Disk"
Disk and Mount Commands
fdisk... Continue reading "Essential Linux and Windows Log Commands for Troubleshooting" »