1
0
mirror of https://github.com/onkelbeh/cheatsheets.git synced 2025-10-17 07:57:43 +02:00
cheatsheets/scp.md
Andrew 246693576d
added port param (#1559)
connect to custom port
2021-01-07 22:43:55 +11:00

942 B

title, category, layout, updated, authors
title category layout updated authors
scp CLI 2017/sheet 2018-12-25
github
vastpeng

Usage

{: .-prime}

scp <options> source_path destination_path

Conditions

-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
-P      # connection port
-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