从 ssh 下载整个文件夹的文件

Download of whole folders of files from ssh

我需要 select 并下载许多存储在我只能通过远程 ssh 连接访问的计算机上的文件夹。我创建了一个列表 ("list.txt") 来只下载我感兴趣的文件夹,我 尝试使用

的“for”循环
for i  in "list.txt"; do 
    scp -r /pwd/of/folder/of/origen/ /pwd/of/folder/destiny; 
done

但是不要阅读我的列表并下载所有文件夹, 我也试过

for i  in "list.txt"; do 
    rsync -Pavizuh /pwd/of/folder/of/origen/$i /pwd/of/folder/destiny; 
done

但发送消息:

sent 29 bytes  received 20 bytes  98.00 bytes/sec

total size is 0  speedup is 0.00

rsync error: some files could not be transferred (code 23) at /System/Volumes/Data/SWE/macOS/BuildRoots/d7e177bcf5/Library/Caches/com.apple.xbs/Sources/rsync/rsync-55/rsync/main.c(996) [sender=2.6.9]

building file list ... 

rsync: link_stat "/Users/rtorres/daniela/Proyecto/Anotacion/Strain9998" failed: No such file or directory (2)

0 files to consider

我能做什么? 谢谢!

您想要“list.txt”的内容,而不是文字名称“list.txt”。

for i  in $(cat list.txt); do 
    scp -r server:/pwd/of/folder/of/origen/$i /pwd/of/folder/destiny/$i
done