Dev Note 2

It’s been so long since I tried to copy files in the terminal (I got used to Windows and Putty and WinSCP) that I forgot the commands and such. This is a tl;dr of the commands and some flags often used.

  • Copying the current working directory to ~/ directory of another computer with the .pem key file (-i means include the key file, -r means recursive, and -p means preserve the modification times, access times, and modes of the original files)
scp -i pathToKey/KEY.pem -rp ./ USER@ADDRESS.com:~
  • Copying just a file to ~/ directory of another computer with .pem key file
scp -i pathToKey/KEY.pem pathToFile/file.txt USER@ADDRESS.com:~
  • Copying files locally can be done with cp
cp pathToLocalFile/file1.txt destinationPath