From 3ce936798fd8feff9a05ce09461da7428d60cfd2 Mon Sep 17 00:00:00 2001 From: Junwei Zhao Date: Tue, 18 Sep 2018 11:54:29 +0800 Subject: [PATCH] Add scp usage --- categories/devops/linux.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/categories/devops/linux.md b/categories/devops/linux.md index 12f3d76..39145f5 100644 --- a/categories/devops/linux.md +++ b/categories/devops/linux.md @@ -90,3 +90,17 @@ if ! nc -z localhost 5672; then sleep 3; fi ``` + +### scp copy files between host + +#### Copy files from remote server + +```bash +scp your_username@remotehost.edu:foobar.txt /local/dir +``` + +### Copy local files to remote server + +```bash +scp /path/to/local/file user@server:/path/to/remote/file +```