Windows 10 useful commands:
  • To find PID of process listening on port 104:
  • netstat -a -b -o -n | findstr /R ":104"
  • to kill a process using its PID
  • taskkill /F /PID [PID Number]
    (e.g.taskkill /F /PID 7796)
  • to modify/remove access credentials to network disks/other PCs
  • control keymgr.dll
  • to run a process in the background (equal to "command &" in Linux)
  • In PowerShell: Start-Process -WindowStyle hidden [program/batch/command]

    Linux useful commands
  • To perform in bash simple calculations
  • echo "10./2." | bc -l
  • To count files with .nii extension in a directory
  • ls -1 *.nii | wc -l
  • To send output of a bash commadn to echo
  • for i in `ls *.txt` ; do echo $i ; done
  • To rename multiple files using find
  • find . -type f -name 'OLDNAME.TXT' -execdir mv {} NEWNAME.TXT \;