Last Updated: February 25, 2016
· jjperezaguinaga

Share files through a SFTP server.

Note, see the title? Please don't deploy webpages with FTP, use some sort of version control system and automate that with a build system, there are plenty of those!

So, my old computer screen broke and I needed some files from it. I couldn't see a thing, yet I knew how to open a terminal and type commands (another reason on why you should learn some scripting).

From my old computer, putting my files recursively:

scp -r ~/path/to/dir/* user@ftp.domain.com:/home/u/user/folder/

From my new computer, getting my files recursively:

sftp user@ftp.domain.com
cd folder
get -r *

There you go. It will get all those files from the current folder you are. Use !ls to see where that is.