Last active
April 28, 2019 08:55
-
-
Save fbchow/5815dac910b725dfa2b0af0e0ad6dd2a to your computer and use it in GitHub Desktop.
Copying & Moving Files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
added how to put file onto Linux server