Add usage sample of sftp (#197)

Co-authored-by: I306454 <jiabin.zheng01@sap.com>
This commit is contained in:
Jack 2020-09-25 17:03:50 +08:00 committed by GitHub
parent 93384d69ec
commit 8c33407e17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 23 additions and 0 deletions

View File

@ -30,5 +30,28 @@ sftp(选项)(参数)
目标主机指定sftp服务器ip地址或者主机名。
### 实例
建立联接
```shell
$ sfpt username@1.1.1.1 # 回车输入密码
```
获取文件下载到指定路径
```shell
sftp> get /export/sftp/test.csv /Users/my/Downloads
Fetching /export/sftp/test.csv to /Users/my/Downloads/test.csv
/export/sftp/test.csv 100% 133 0.3KB/s 00:00
```
上传本地文件到服务器指定路径
```shell
sftp> put /Users/my/Downloads/re-produce.gif /export/sftp
Uploading /Users/my/Downloads/re-produce.gif to /export/sftp/re-produce.gif
/Users/my/Downloads/re-produce.gif 100% 257KB 86.6KB/s 00:02
```
<!-- Linux命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->