New answers tagged

2

You have the name of the service wrong. Try: # systemctl restart smb.service # systemctl restart nmb.service


0

Probably the easiest way to remove blank lines (without spaces) is to use cat -s: $ cat -s file $ some-command | cat -s At least if you don't want to edit a file in-place but for example write to the terminal instead. Also, it doesn't involve any funny regex business so it's super easy to remember even for non-RE-friendly people. From man cat: -s, --...


0

I changed the line where i call the program to: start /hight <path-to-program> <params> This means to start program in hight priority. It is much faster and it does not require you to press any keys during execution


2

You can use Get-ItemProperty to get the name and value of a Registry Key. Working with Registry Entries Get-ItemProperty Sample Code: Get-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\PowerShell\1\PowerShellEngine | Select PowerShellVersion


0

On Ubuntu 18.04 server I had to use the following: (found in man pages) echo '{"hostUp": true}' | sudo /usr/local/bin/netcat -N localhost 8001 Obviously the -N is similar to -q or -c on other distros


Top 50 recent answers are included