...
Here are several command line tools to make managing files easier:
scp (
...
Secure Copy)
Secure copy or SCP is a means of securely transferring computer files between a local host and a remote host or between two remote hosts. It is based on the Secure Shell (SSH) protocol. From the command line interface, the local host is always represented by the text before the $ in your command line prompt.
Expand | ||
---|---|---|
| ||
Example: |
Copy Copying a file or folder from a remote host to your local host SCP example host using SCP:
Code Block |
---|
$ scp username@from_host:/path_to_file/file.txt /local/folder/ |
Code Block |
---|
$ scp -r username@from_host:/path_to_folder/folder /local/folder |
Copy Copying a file or folder from local host to a remote host using SCP example:
Code Block |
---|
$ scp file.txt username@to_host:/remote/folder/ |
Code Block |
---|
$ scp -r /local/folder username@to_host:/remote/folder |
Copy Copying a file from one remote host to another remote host using SCP example:
Code Block |
---|
$ scp username@from_host:/remote/folder/file.txt username@to_host:/remote/folder/ |
Copy all of the contents from a local host folder into a remote host folder using SCP:
Code Block |
---|
$ scp -r /local/folder/. username@to_host:/remote/folder/ |
...