Skip to content

Instantly share code, notes, and snippets.

@jamesgiroux
Last active August 29, 2015 14:00
Show Gist options
  • Save jamesgiroux/11228271 to your computer and use it in GitHub Desktop.
Save jamesgiroux/11228271 to your computer and use it in GitHub Desktop.
1) login to your shell
2) cd to the directory you're trying to move files to
3) open a screen (just type screen and press enter)
4) wget or scp to transfer the files
5) ctrl-a and press d to detach from the screen so it runs in the background
6) you can safely disconnect from the shell while the transfer is taking place
7) reattach the screen, type "screen -r" if you only have one screen open
8) confirm the transfer of files, you might have to move them around depending on the file structure
this is also a good way to transfer the db dump as well - and if its a big dump, use the mysql command to import it rather than going through phpMyAdmin
the screen steps are wholly optional
but they ensure fidelity of the transfer - anytime you're doing anything major that shouldn't be disturbed, such as compilation or transfers, you want to screen it, because typically any disconnect from the shell account will terminate the running processes, which is no good
I've been halfway through a recompile of apache/php and had the process inadvertently terminate and brick a bunch of stuff
As originally posted by ET Cook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment