From 8620b27b03ed08ead9505a23ef55796c3230d8e4 Mon Sep 17 00:00:00 2001 From: Alexander Jegtnes Date: Thu, 30 Jan 2014 14:22:27 +0000 Subject: [PATCH 1/3] Clarifying scp --- common/scp.md | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/common/scp.md b/common/scp.md index af7681e98..9bc7e6936 100644 --- a/common/scp.md +++ b/common/scp.md @@ -3,16 +3,30 @@ > Copies files between hosts on a network > Works over a secure connection (SSH) -- upload a file or directory +- upload a file + +`scp {{/local/file.txt}} {{10.0.0.1}}:{{/remote/path/}}` + +- upload a file and change its name + +`scp {{/local/file.txt}} {{10.0.0.1}}:{{/remote/path/newname.txt}}` + +- upload a folder -`scp {{/local/file}} {{10.0.0.1}}:{{/remote/path/}}` -`scp {{/local/file}} {{10.0.0.1}}:{{/remote/path/newname}}` `scp -r {{/local/folder}} {{10.0.0.1}}:{{/remote/path/}}` -- download a file (reversed) +- download a file -`scp {{10.0.0.1}}:{{/remote/path/filename}} {{/local/file}}` +`scp {{10.0.0.1}}:{{/remote/path/file.txt}} {{/local/folder}}` + +- download a folder + +`scp -r {{10.0.0.1}}:{{/remote/path}} {{/local/folder}}` - specify credentials -`scp {{/local/file}} {{my_user}}@{{10.0.0.1}}:{{/remote/path/}}` +`scp {{/local/file.txt}} {{my_user}}@{{10.0.0.1}}:{{/remote/path}}` + +- copy a file from one host to another + +`scp {{10.0.0.1}}:{{/remote/path/file.txt}} {{20.0.0.2}}:{{/other/remote/path}}` From 836da6c5d7d503d4bde7c282c3bdcb45263f2268 Mon Sep 17 00:00:00 2001 From: Alexander Jegtnes Date: Thu, 30 Jan 2014 14:26:55 +0000 Subject: [PATCH 2/3] Reversed directory->folder, header microcopy --- common/scp.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/scp.md b/common/scp.md index 9bc7e6936..149d9ff5b 100644 --- a/common/scp.md +++ b/common/scp.md @@ -11,7 +11,7 @@ `scp {{/local/file.txt}} {{10.0.0.1}}:{{/remote/path/newname.txt}}` -- upload a folder +- upload a directory `scp -r {{/local/folder}} {{10.0.0.1}}:{{/remote/path/}}` @@ -19,11 +19,11 @@ `scp {{10.0.0.1}}:{{/remote/path/file.txt}} {{/local/folder}}` -- download a folder +- download a directory `scp -r {{10.0.0.1}}:{{/remote/path}} {{/local/folder}}` -- specify credentials +- specify username on host `scp {{/local/file.txt}} {{my_user}}@{{10.0.0.1}}:{{/remote/path}}` From 977600677cf63ac36965701313c64d40a2c1c572 Mon Sep 17 00:00:00 2001 From: Alexander Jegtnes Date: Thu, 30 Jan 2014 14:30:19 +0000 Subject: [PATCH 3/3] Shortened scp page --- common/scp.md | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/common/scp.md b/common/scp.md index 149d9ff5b..a9ff9ba4e 100644 --- a/common/scp.md +++ b/common/scp.md @@ -3,24 +3,18 @@ > Copies files between hosts on a network > Works over a secure connection (SSH) -- upload a file +- upload a file, or upload and rename a file `scp {{/local/file.txt}} {{10.0.0.1}}:{{/remote/path/}}` - -- upload a file and change its name - `scp {{/local/file.txt}} {{10.0.0.1}}:{{/remote/path/newname.txt}}` -- upload a directory - -`scp -r {{/local/folder}} {{10.0.0.1}}:{{/remote/path/}}` - - download a file `scp {{10.0.0.1}}:{{/remote/path/file.txt}} {{/local/folder}}` -- download a directory +- upload or download a directory +`scp -r {{/local/folder}} {{10.0.0.1}}:{{/remote/path/}}` `scp -r {{10.0.0.1}}:{{/remote/path}} {{/local/folder}}` - specify username on host