Note book to help you and me remember some tricks

Category cmd

Start/Stop windows services from shell script on linux server

Context: you have a shell script running on a linux server and you want this shell script be able to stop or start services on a windows server Windows: Create a local administrator Create a local administrator that we call… Continue Reading →

How to empty a file with cmd or powershell? (equivalent of linux: cat /dev/null > pathtofile)

cmd version: The file is now 0 byte size, and occupies 0 byte on disk. powershell version: In this case, the properties of the file show us it’s now 2 bytes size then not completely empty. And the file uses… Continue Reading →

© 2024 Software engineer >> Sysadmin >> Devops >> SRE

Up ↑