1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2024-11-02 09:17:57 +01:00
tldr/pages/common/scp.md
Srinivasan R 2097cf359d Add extra newline between consecutive commands examples.
These 6 files had multiple examples all separated by a single newline.
While rendering it in markdown, the examples all come up in a single
line.
Adding another newline makes rendering better.
Also will help in easier copying (double click on the line to copy).
2015-10-28 22:40:44 +05:30

32 lines
807 B
Markdown

# scp
> Copies files between hosts on a network
> Works over a secure connection (SSH)
- upload a file, or upload and rename a file
`scp {{/local/file.txt}} {{10.0.0.1}}:{{/remote/path/}}`
`scp {{/local/file.txt}} {{10.0.0.1}}:{{/remote/path/newname.txt}}`
- download a file
`scp {{10.0.0.1}}:{{/remote/path/file.txt}} {{/local/folder}}`
- 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
`scp {{/local/file.txt}} {{my_user}}@{{10.0.0.1}}:{{/remote/path}}`
- specify port on host
`scp -P {{port}} {{/local/file.txt}} {{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}}`