我有一个简单的问题。如何从服务器中的文件夹下载(例如仅下载 json 文件)。
以下代码是我使用的,它会下载所有内容。
scp -r name:server:folder_name .
我想添加一些过滤,以便仅下载选定的文件,例如文件以 .json
或 .wav
结尾
最佳答案
使用通配符
scp name:server:~/{*.json,*.wav} .
Commands can use wildcards to perform actions on more than one file at a time, or to find part of a phrase in a text file.
Source: TLDP
关于linux - 如何从服务器 SCP 选定的文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57041582/