From 5b80fe345f8af8a018e29bd4754e35d682cf809c Mon Sep 17 00:00:00 2001 From: Matthew Date: Mon, 28 Dec 2015 13:05:55 +0800 Subject: [PATCH 1/4] remove duplicate line and add a new common usage. remove duplicate lines and add a new common usage of '-avz' --- pages/common/rsync.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/common/rsync.md b/pages/common/rsync.md index 5c2181418..1d1b9f4b4 100644 --- a/pages/common/rsync.md +++ b/pages/common/rsync.md @@ -4,7 +4,7 @@ > Does not allow transfer between two remote hosts > Can transfer single files or files matched by pattern -- transfer file from local to remote host +- transfer file from local to remote host, it supports regex. `rsync {{path_to_file}} {{remote_host_name}}:{{remote_host_location}}` @@ -12,13 +12,13 @@ `rsync {{remote_host_name}}:{{remote_file_location}} {{local_file_location}}` -- transfer all *.js files in current directory to host 'devbox' as user 'mike' +- transfer file in archive and compress mode, it ensures symbolic link, device, attr, permissions, are preserved, and reduce the size. -`rsync *.js mike@devbox:~/projects/cakeStore/styles/` +`rsync -avz {{path_to_file}} {{remote_host_name}}:{{remote_host_location}}` - transfer a directory and all its children from a remote to local -`rsync -r mike@devbox:~/projects/cakeStore /Users/mike/devProjects/` +`rsync -r {{remote_host_name}}:{{remote_folder_location}} {{local_folder_location}}` - transfer file over SSH and show progress From 67e4f1351614e278a84ebf0b5ddd03bc3cb3291c Mon Sep 17 00:00:00 2001 From: Matthew Date: Mon, 28 Dec 2015 20:06:22 +0800 Subject: [PATCH 2/4] reduce the explanation. reduce the explanation. --- pages/common/rsync.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/common/rsync.md b/pages/common/rsync.md index 1d1b9f4b4..e9d72113c 100644 --- a/pages/common/rsync.md +++ b/pages/common/rsync.md @@ -12,7 +12,7 @@ `rsync {{remote_host_name}}:{{remote_file_location}} {{local_file_location}}` -- transfer file in archive and compress mode, it ensures symbolic link, device, attr, permissions, are preserved, and reduce the size. +- transfer file in archive and compress mode, it keeps attribute and reduces the size. `rsync -avz {{path_to_file}} {{remote_host_name}}:{{remote_host_location}}` From 86321bcb0e5af9e5f48a4dc3477281b091c229d0 Mon Sep 17 00:00:00 2001 From: Matthew Date: Tue, 29 Dec 2015 12:44:42 +0800 Subject: [PATCH 3/4] Update description Update description --- pages/common/rsync.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/common/rsync.md b/pages/common/rsync.md index e9d72113c..94f49986d 100644 --- a/pages/common/rsync.md +++ b/pages/common/rsync.md @@ -12,9 +12,9 @@ `rsync {{remote_host_name}}:{{remote_file_location}} {{local_file_location}}` -- transfer file in archive and compress mode, it keeps attribute and reduces the size. +- transfer file in archive (to preserve attributes) and compressed (zipped) mode -`rsync -avz {{path_to_file}} {{remote_host_name}}:{{remote_host_location}}` +`rsync -az {{path_to_file}} {{remote_host_name}}:{{remote_host_location}}` - transfer a directory and all its children from a remote to local From d693904250aeb8a22e91631f20703deca5efe47d Mon Sep 17 00:00:00 2001 From: Matthew Date: Tue, 29 Dec 2015 13:03:08 +0800 Subject: [PATCH 4/4] better than better better than better --- pages/common/rsync.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/common/rsync.md b/pages/common/rsync.md index 94f49986d..d6342fedf 100644 --- a/pages/common/rsync.md +++ b/pages/common/rsync.md @@ -4,9 +4,9 @@ > Does not allow transfer between two remote hosts > Can transfer single files or files matched by pattern -- transfer file from local to remote host, it supports regex. +- transfer file from local to remote host, filename supports regex. -`rsync {{path_to_file}} {{remote_host_name}}:{{remote_host_location}}` +`rsync {{path/to/file}} {{remote_host_name}}:{{remote_host_location}}` - transfer file from remote host to local @@ -14,7 +14,7 @@ - transfer file in archive (to preserve attributes) and compressed (zipped) mode -`rsync -az {{path_to_file}} {{remote_host_name}}:{{remote_host_location}}` +`rsync -az {{path/to/file}} {{remote_host_name}}:{{remote_host_location}}` - transfer a directory and all its children from a remote to local