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,
- Rename a directory using Linux/Unix command
- ls command to list only directories
- How to Restart or Reload Nginx Server Service on Linux
- 3 ways to clear screen on Linux Terminal
- ls command: sort files by name alphabetically A-Z or Z-A [Linux/Unix/macOS/Bash]
- Copy entire directory using Terminal Command [Linux, Mac, Bash]
- Fix: sudo: unable to open Read-only file system
- Create Hidden File or Directory using Shell Command
- Command to know the installed Debian version?
- The Date Command and its usage [Linux - Unix - macOS]
- Fix - bash: man: command not found
- How to tar.gz a directory or folder Command
- How to Display content of a file in Terminal Screen?
- How to change bash terminal prompt string and color
- Sort ls command by last modified date and time
- Execute .bin and .run file Ubuntu Linux
- zsh hello world example
- How to check uptime of Linux/Unix/macOS system/server using console command?
- [Fix] Linux - bash: useradd: command not found
- Command to check Last Login or Reboot History of Users and TTYs
- How to install and Configure sar sysstat tools in Ubuntu Linux
- How to use SCP Command to Copy Directory
- Linux Remove or Delete Files and Directories using Terminal Commands
- How to connect to SSH port other than default 22
- Install OpenSSL on Linux/Ubuntu
More Posts:
- Change battery percentage in Android Emulator - Android
- Facebook | Error : Sorry, something went wrong We're working on it and we'll get it fixed as soon as we can - Facebook
- Git Remove Untracked Files using Command - Git
- How to Exit a File in Terminal (Bash/Zsh) - Linux
- Notepad++ Replace space with Dot - NotepadPlusPlus
- [Solution] Installing Whatsapp There's insufficient space on the device - WhatsApp
- Java Program to generate random string - Java
- Open VS Code Command Palette using Keyboard Shortcut - Shortcuts