GoGreen PC Tune-Up™
Learn More

Insta-Install™
this is how ssl encrypt our websites
MTNCOMP | List View | Table View | myBlog (1767 Entries)
myBlog Home

Blog


MS-DOS finally found a use for PowerShell whereas CMD comes up short - tail - head

by Mountain Computers Inc., Publication Date: Sunday, January 30, 2022

View Count: 877, Keywords: MS-DOS, PowerShell, CMD, COMMAND, Get-Content, Tail, Head, Hashtags: #MS-DOS #PowerShell #CMD #COMMAND #Get-Content #Tail #Head



I finally found a useful thing in PowerShell that Command (CMD) cannot do. It's called tail or head which I find in Linux everywhere.so, PowerShell, huh? can't do a tail or head on Command (CMD)
 
Launch PowerShell, then use the Get-Content command and add tail or head and the number of lines you want to show.
 
Get-Content {filename} -{options} {number of lines}
 
type
 
Get-Content {filename} -tail 10
or
Get-Content {filename} -head 10
 
voila! I just had to head and tail a 380GB raw data log file and command CMD would not do it.
 
more to come...

if you found this article helpful, consider contributing $10, 20 an Andrew Jackson or so..to the author. more authors coming soon
FYI we use paypal or patreon, patreon has 3x the transaction fees, so we don't, not yet.

© 2024 myBlog™ v1.1 All rights reserved. We count views as reads, so let's not over think it.