Skip to content

Instantly share code, notes, and snippets.

@aiafrasinei
Created February 17, 2020 07:04
Show Gist options
  • Save aiafrasinei/b00878679445f08ef9121d9ca4f65f8f to your computer and use it in GitHub Desktop.
Save aiafrasinei/b00878679445f08ef9121d9ca4f65f8f to your computer and use it in GitHub Desktop.
linux shell
change to previous working directory:
cd -
cd $OLDPWD
backup file:
cp file{,.bak}
change file extension:
mv file{.old,.new}
ssh into remote computer:
ssh-keygen
ssh-copy-id remote-host
programs listening on ports:
netstat -nutlp
command substitution:
$ VAR=`command`
$ VAR=$(command)
automatically answer yes to any commands:
yes | command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment