Skip to content

Instantly share code, notes, and snippets.

@fbchow
Last active April 28, 2019 08:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fbchow/5815dac910b725dfa2b0af0e0ad6dd2a to your computer and use it in GitHub Desktop.
Save fbchow/5815dac910b725dfa2b0af0e0ad6dd2a to your computer and use it in GitHub Desktop.
Copying & Moving Files
I always forget the exacty syntax for copying & moving files, especially when dealing with a remote Linux server. And I had wrote some documentation years ago but lost it (so much for persistent storage!). So here's some notes:
Change into the directory you want to download the files
cd /home/dir_to_dump_file_in
Log onto server using Safe File Transfer Protocol--just like how you would "ssh" into the Linux server
sftp homersimpson@sprinfielduniversity.edu
password: ilovemarge
Obtain the files from the Linux server on to your local server
get -r file_named_marge
or put the files from your local server onto the Linux server
put file_name
How to quit
sftp> quit
Also some other good resources:
<https://itservices.usc.edu/sftp/cline/>
<https://ryanstutorials.net/linuxtutorial/filemanipulation.php>
Wow, an easier way:
from your local directory upload file into server
scp file.py your_username@remotehost.edu:/some/remote/directory
@fbchow
Copy link
Author

fbchow commented Sep 19, 2017

added how to put file onto Linux server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment