Copy
one single local file to a remote destination
scp
/path/to/source-file user@host:/path/to/destination-folder/
Copy one single file from a remote server to your current local server
scp user@host:/path/to/source-file /path/to/destination-folder
Copy one single file from a remote server to another
remote server
scp user1@server1:/path/to/file user2@server2:/path/to/folder/
Copy one single file from a remote host to the same
remote host in another location
scp jane@host.example.com:/home/jane/table.csv
pete@host.example.com:/home/pete/
Copy multiple files with one command
scp file1.txt file2.txt file3.txt pete@host.example.com:/home/pete/
scp file1.txt file2.txt file3.txt pete@host.example.com:/home/pete/
Copy
all files of a specific type
scp
/path/to/folder/*.ext user@server:/path/to/folder/
Copy
all files in a folder to a remote server
Copy
all files in a folder recursively to a remote server
scp
-r /home/user/html/* jane@host.example.com:/home/jane/backup/
Copy a folder and all its contents to a remote server
scp
-r /path/to/source-folder user@server:/path/to/destination-folder/
Specify a port
scp -P [port] [user]@[server]:[path/to/]file [/path/to/]file
No comments:
Post a Comment