From fd17d3f1b6480d75b05fb7510d36c3ca82a5e2f2 Mon Sep 17 00:00:00 2001 From: Vast Date: Thu, 6 Dec 2018 09:59:38 +0800 Subject: [PATCH 1/4] add(cheatsheet): scp --- scp.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 scp.md diff --git a/scp.md b/scp.md new file mode 100644 index 000000000..b7148c185 --- /dev/null +++ b/scp.md @@ -0,0 +1,31 @@ +--- +title: scp +category: CLI +layout: 2018/sheet +--- + +### Usage +{: .-prime} + +```bash +scp source_path destination_path +``` + +### Conditions + +```bash +-r # transfer directory +-v # see the transfer details +-C # copy files with compression +-l 800 # limit bandwith with 800 +-p # preserving the original attributes of the copied files +-q # hidden the output +``` + +### Commands + + $ scp file user@host:/path/to/file # copying a file to the remote system using scp command + $ scp user@host:/path/to/file /local/path/to/file # copying a file from the remote system using scp command + + $ scp file1 file2 user@host:/path/to/directory # copying multiple files using scp command + $ scp -r /path/to/directory user@host:/path/to/directory # Copying an entire directory with scp command From 08d176e787be3e9ed1bf8df9a7dfc9a7390f3d13 Mon Sep 17 00:00:00 2001 From: "Rico Sta. Cruz" Date: Tue, 25 Dec 2018 20:27:52 +0800 Subject: [PATCH 2/4] scp: Update formatting --- scp.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/scp.md b/scp.md index b7148c185..9f3bc39f4 100644 --- a/scp.md +++ b/scp.md @@ -2,6 +2,8 @@ title: scp category: CLI layout: 2018/sheet +authors: + - github: vastpeng --- ### Usage @@ -24,8 +26,12 @@ scp source_path destination_path ### Commands - $ scp file user@host:/path/to/file # copying a file to the remote system using scp command - $ scp user@host:/path/to/file /local/path/to/file # copying a file from the remote system using scp command +```bash +$ scp file user@host:/path/to/file # copying a file to the remote system using scp command +$ scp user@host:/path/to/file /local/path/to/file # copying a file from the remote system using scp command +``` - $ scp file1 file2 user@host:/path/to/directory # copying multiple files using scp command - $ scp -r /path/to/directory user@host:/path/to/directory # Copying an entire directory with scp command +```bash +$ scp file1 file2 user@host:/path/to/directory # copying multiple files using scp command +$ scp -r /path/to/directory user@host:/path/to/directory # Copying an entire directory with scp command +``` From 7d2217779aa1cd0b665f7bcc35e4d2e53913fd72 Mon Sep 17 00:00:00 2001 From: "Rico Sta. Cruz" Date: Tue, 25 Dec 2018 20:28:06 +0800 Subject: [PATCH 3/4] scp: Fix wrong layout --- scp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scp.md b/scp.md index 9f3bc39f4..e6e8568ac 100644 --- a/scp.md +++ b/scp.md @@ -1,7 +1,7 @@ --- title: scp category: CLI -layout: 2018/sheet +layout: 2017/sheet authors: - github: vastpeng --- From 5d99c3619f2c13dfbbdd7a003e66a347e6888ad5 Mon Sep 17 00:00:00 2001 From: "Rico Sta. Cruz" Date: Tue, 25 Dec 2018 20:28:54 +0800 Subject: [PATCH 4/4] scp: Update timestamp --- scp.md | 1 + 1 file changed, 1 insertion(+) diff --git a/scp.md b/scp.md index e6e8568ac..dd0cc29c0 100644 --- a/scp.md +++ b/scp.md @@ -2,6 +2,7 @@ title: scp category: CLI layout: 2017/sheet +updated: 2018-12-25 authors: - github: vastpeng ---