PowerShell

Large Files

Get bottom lines of file

Get-Content .\access.log -Tail 100000  | Set-Content .\greg01.log 

Grep from bottom lines

Get-Content .\greg01.log -Tail 100000 | Select-String -Pattern "16/Dec/2019:0" -SimpleMatch | Set-Content .\greg01-time.log 

Last updated

Was this helpful?