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
- How to run SCP in verbose mode?
- Running SCP in quiet mode
- How to show progress when using SCP?
- How to overwrite files using SCP?
- How to transfer files recursively using SCP?
- Is it possible to SCP files in parallel?
- How to use SCP with a password?
- How to list files using SCP?
- How to enable logging when using SCP?
- How to SCP from a remote to a local machine?
See more codes...