Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
Tags
- plugin
- grep
- VirtualBox
- maVen
- vscode
- Mac
- GIT
- import
- find
- web.xml
- tomcat
- Windows 10
- bash
- IntelliJ
- profile
- Source
- 네트워크
- Eclipse
- xargs
- lsof
- 줄바꿈 문자
- port
- Windows
- ssh
- netsh
- 단축키
- context
- Quartz
- JavaScript
- resource
Archives
- Today
- Total
develog
rsync 본문
rsync 사용법
기본 사용법
# target 을 source 기준으로 동기화시킨다
rsync source target
실제 사용법
rsync -avr /home/dev/www/ 'ssh -p 873' dev@127.0.0.1:/home/dev/www/
옵션 설명
-a: archive mode (심볼릭 링크, 속성, 퍼미션, 소유권 등 보존)
-v: verbose (자세히 출력)
-r: recursive (하위 디렉토리까지 동기화)
rsync 원격지 파일 땡겨오기
rsync -avr -e ssh dev@127.0.0.1:/home/dev/www /home/dev/www
디렉토리 자체 복사 vs 디렉토리 안에 파일만 복사
# my-app 디렉토리 자체를 복사
# 경로 뒤에 / 가 없음
rsync -avr my-app root@192.168.56.11:/var/www/html
# my-app 디렉토리 안에 있는 내용만 복사
# 경로 뒤에 / 가 있음
rsync -avr my-app/ root@192.168.56.11:/var/www/html
rsync -avr my-app/* root@192.168.56.11:/var/www/html
'OS & Shell > Linux' 카테고리의 다른 글
JDK 버전 확인 (0) | 2012.04.13 |
---|---|
apachectl 옵션 (0) | 2012.04.13 |
[linux] 시스템 정보 확인 (0) | 2012.04.12 |
[linux] 디렉토리 구조 (0) | 2012.04.12 |
[linux] 아파치 웹서버 동시접속 세션수 확인 (0) | 2012.04.12 |
Comments