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
- How to transfer files recursively using SCP?
- How to show progress when using SCP?
- How to run SCP in verbose mode?
- How to overwrite files using SCP?
- How to use SCP with a password?
- How to SCP multiple files?
- How to list files using SCP?
- How to SCP all files in a directory?
See more codes...