Monday, January 21, 2019

Windows (powershell) counterparts of Linux commands

You may find Windows mostly powershell equivalent of frequently used Linux commands here.

I will update this post, with newer ones by the time...


tail -100f <file mask>


Via powershell, without installing new software, you may issue below command for refreshing the alert log and seeing last 100 rows displayed in the very beginning.
Get-Content alertmydb.log -Wait -tail 100

2019-01-21_13-33-24


history


For history of commands executed simply issue.
Get-History

2019-01-21_12-49-35


grep


select-string <string to look for> <file name>

2019-01-21_12-40-38

find

Find the files having a mask alert*log up to 5 directories depth.

gci -Path alert*log -Recurse -Depth 5

https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-childitem?view=powershell-6

2019-01-21_13-47-03

 

No comments:

Windows (powershell) counterparts of Linux commands

You may find Windows mostly powershell equivalent of frequently used Linux commands here. I will update this post, with newer ones by the ti...