Skip to main content

Powershell: head and tail command

Use head or tail to skim the first or last 5 lines.

Show the first 5 lines

Get-Content filename -head 5

Show the last 5 lines

Get-Content filename -tail 5

Keep monitoring the last 5 lines

Get-Content filename -tail 5 -wait

Popular posts from this blog

ManageEngine ServiceDesk Plus - Reset password

Let's reset the default administrator's password to 'admin'

VyOS: Upgrade system image

Let's upgrade VyOS system image 1.1.7 to 1.1.8 show system image add system image https://downloads.vyos.io/release/1.1.8/vyos-1.1.8-amd64.iso

MSSQL: Fix error 'Consistency validation for SQL Server registry keys'

While installing Microsof SQL Server 2012, I ran into the following error. "The SQL Server registry keys from a prior installation cannot be modified. To continue, see SQL Server Setup documentation about how to fix registry keys." How to fix Replace the D:\x64\FixSqlRegistryKey_x86.exe file with the original file from the ENU\SQLFULL_ENU.iso file downloading from Microsoft Download Center. This ISO file is 4.2GB. So you can click FixSqlRegistryKey_x86.exe to download this file only. After replacing that file, press Re-run to check. All rules are passed.