
Copy Directory using SCP Command
SCP - OpenSSH secure file copy is a command that you can make use of to download or upload files and directories to a remote location.
SCP lets you copy files between hosts on a network.
If you want to copy (download) a complete directory and sub-directories from a remote server to your local system you can make use of the SCP command in the below way,
Example: Downloading/Copying files from remote server to your system
% scp -r
user-name@ssh.remote-location-url-and-domain/remote/dir/path
/local/destination/path/to/copy/directory/
As you can see in the above example, -r option lets you copy the entire directory.
Example: Copy the remote directory to the current directory,% scp -r user-name@ssh.remote-location-url/remote/dir/path .
Example: Downloading/Copying files from your system to a remote server
% scp -r
/local/path/to/copy/directory/
user-name@ssh.remote-location-url-and-domain/remote/dir/path
More Posts related to Linux,
- [Fix] Linux - bash: useradd: command not found
- Calculate days between dates using dateutils ddiff command
- pwd Command - Print Working Directory
- Rename a directory using Linux/Unix command
- How to go to the End of File in Nano Editor
- How to tar.gz a directory or folder Command
- How to remove/delete a directory in Linux/macOs
- How to Display content of a file in Terminal Screen?
- ls command sort by file size [Linix/UNIX/macOS/bash]
- How to Copy Entire Directory to another Directory in Linux
- 3 ways to clear screen on Linux Terminal
- Command to check Last Login or Reboot History of Users and TTYs
- How to check uptime of Linux/Unix/macOS system/server using console command?
- How to backup a file in Linux/Unix
- Command to know the installed Debian version?
- Check SSH/OpenSSH version Command
- 3 Commands to stop Nginx Server
- Linux: Create a New User and Password and Login Example
- How to install npm on Ubuntu
- How to List All Users in Linux
- How to Get the List of Shells on Linux
- Fix - ssh-copy-id no identities found error
- Installing and using unzip Command to unzip a zip file using Terminal
- scp: ssh: connect to host xxxx port 22: Connection refused Error
- zsh hello world example
More Posts:
- How to migrate Kaizala to Microsoft Teams - Teams
- Notepad++ Export file as HTML - NotepadPlusPlus
- Shutdown Mac Terminal Command - MacOS
- Notepad++ Reload - This file has been modified by another program. Do you want to reload it? - NotepadPlusPlus
- Remove Possible Data Loss Message from Microsoft Excel - Microsoft
- Fail to connect to camera service Android java RuntimeException - Android
- [Solution] Exception in thread main java.util.EmptyStackException - Java
- Turn Off Google Analytics intelligence Alert Emails - Google