1. 기본 파일 보내기
scp [source file] [username]@[destination server]:.[path]
scp [source file] [username]@[destination server]:.
예시)
해당 파일이 있는 폴더 위치로 이동해서
scp .\source.zip home@112.15.36.3:~/2023/codeDir
패스워드 넣으면 100%가 될때까지 숫자가 로딩된다.
2. 폴더 전체 보내기
scp -r [source folder] [username]@[destination server]:[path]
예시) scp -r .\codeDir home@112.15.36.3:~/2023/targeted/
해당 폴더의 부모 폴더로 이동해서 코드를 실행한다.
scp -r .\codeDir home@112.15.36.3:~/2023/targeted/
그러면 codeDir가 통째로 옮겨지는 것을 알 수 있다.
Reference:
https://superuser.com/questions/850740/how-to-upload-local-file-to-server-through-linux-terminal
How to upload local file to server through Linux terminal
I am trying to upload local files to server by using Putty or SSH but not getting upload there. Is there any direct method to upload file from local to server from Linux terminal without using FTP...
superuser.com
How to copy all files from a directory to a remote directory using scp?
My goal is copy only all files from ~/local_dir to user@host.com /var/www/html/target_dir using scp and do not create local_dir category in local_dir. /var/www/html/target_dir/files.. but not ...
unix.stackexchange.com
'명령어 등등' 카테고리의 다른 글
[vscode] select kernel 문제 해결하기 / kernel이 하나도 안 나타날 때 (0) | 2023.06.13 |
---|---|
google drive link에 있는 파일 다운로드 in colab/ pip install gdown (0) | 2023.05.04 |
해당 경로에서 폴더마다 용량 체크 du -sh * | sort -hr (0) | 2023.04.26 |
[R] 과학적 표기법 바꾸기 options(scipen=10000) (0) | 2023.04.24 |
파일 개수 세기 ls : ls -l | grep ^- | wc -l. (0) | 2023.04.15 |
[R] 클립보드 복사 사용해서 R 데이터 불러오기 read.table(file="clipboard") (0) | 2023.02.15 |
[R] R로 시간 분석하기 / 여섯 자리 글자를 시분초로 읽는 방법 hms (0) | 2023.02.04 |
[R] 한글 들어간 dataframe 제대로 저장하는 법 write.csv (0) | 2023.02.04 |