scpHow to transfer files using wildcards with SCP?
Wildcards can be used to transfer multiple files with SCP. The syntax for using wildcards is scp <source> <destination>
.
Example
scp /home/user/files/*.txt [email protected]:/home/user/
This command will transfer all files with the .txt extension from the /home/user/files/
directory to the /home/user/
directory on the remote server.
Code explanation
scp
: The command to initiate the file transfer/home/user/files/*.txt
: The source directory and wildcard for the files to be transferred[email protected]:/home/user/
: The destination directory on the remote server
Helpful links
More of Scp
- Running SCP in quiet mode
- Is it possible to SCP files in parallel?
- How to show progress when using SCP?
- How to overwrite files using SCP?
- How to use an SSH key when using SCP?
- How to automatically create destination directory when using SCP?
- How to run SCP in verbose mode?
- How to use a different port when using SCP?
- How to use SCP with a password?
See more codes...