In this article, we will take a look at how to copy all files from the directory to a local folder,
Remote Folder Directory:# ls -ltrh
total 8.0K
-rw-r--r-- 1 root root 100 Apr 1 12:34 data.txt
-rw-r--r-- 1 root root 9 Apr 8 12:28 2022-02-04-server.log
-rw-r--r-- 1 root root 0 Apr 8 12:29 localhost.log
-rw-r--r-- 1 root root 0 Apr 8 12:29 image.png
SCP Command:
# scp -r user@192.xxx.xxx.xxx:/usr/data/myRemoteDir/ /path/local/dir
Password:
data.txt 100% 100 1.8KB/s 00:00
2022-02-04-server.logs 100% 8 0.12KB/s 00:01
localhost.log 100% 8 0.1KB/s 00:00
image.png 100% 8 0.22KB/s 00:00
✌️Use -r to copy all the files within a directory with scp command.
More Posts related to Linux,
- Command to know the Available Memory on Linux System
- How to install curl on Alpine Linux
- How to backup a file in Linux/Unix
- Install Java Runtime Environment (Oracle or open JRE) on Ubuntu
- What is the Default Admin user and Password for Jenkins
- How to tar.gz a directory or folder Command
- Copy entire directory using Terminal Command [Linux, Mac, Bash]
- Fix: bash: ipconfig: command not found on Linux
- Command to check Last Login or Reboot History of Users and TTYs
- Linux: Create a New User and Password and Login Example
- ls command to list only directories
- bash: cls: command not found
- How to exit from nano command
- Installing and using unzip Command to unzip a zip file using Terminal
- What does apt-get update command does?
- ls command: sort files by name alphabetically A-Z or Z-A [Linux/Unix/macOS/Bash]
- How to remove or uninstall Java from Ubuntu using apt-get
- scp: ssh: connect to host xxxx port 22: Connection refused Error
- Sort ls command by last modified date and time
- Create Nested Directories using mkdir Command
- How to Exit a File in Terminal (Bash/Zsh)
- Command to know the installed Debian version?
- How to connect to SSH port other than default 22
- How to save a file in Nano Editor and Exit
- Install OpenSSL on Linux/Ubuntu
More Posts:
- How to do a Print Screen on Windows 11 to Screencapture - Windows
- Where is Maven .m2 local repository located on Mac - HowTos
- Java: Convert String to InputStream - Java
- JSON Nest Objects Example: JSON Tutorial - Json-Tutorial
- How to clear Microsoft Teams Cache on Mac (macOS) - Teams
- Python: How to create a Dictionary of Lists with Examples - Python
- Android Shared Preferences API tutorial - Android
- How to Export a PowerShell Script/Cmdlet Output to a Text File - Powershell