bash scp 没有那个文件或目录

标签 bash file scp

我正在使用此代码将一个目录及其所有子目录从远程服务器复制到本地磁盘。

scp -q -r userbane@ip:/var/myFolder /home/

它复制了除 2 之外的所有文件,这给出了这个错误

scp: /var/myFolder/file1.txt: No such file or directory
scp: /var/myFolder/file2.txt: No such file or directory

但这两个文件都存在。 有帮助吗?

最佳答案

I got this when I `ls -l` on the files `lrwxrwxrwx`
                                        ^

它们是符号链接(symbolic link)。他们指向的路径很可能是不可访问的。

关于bash scp 没有那个文件或目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19189474/

相关文章:

c++ - 从文件中读取 long double,然后写入另一个文件

linux - mv 命令有 scp 变体吗?

C++ 从文本文件中读取、解析和添加价格

c# - File.WriteAllText 问题

python - 如何在 awk 或 sed 中编写查找所有函数(使用正则表达式)

bash - ssh perl 脚本未运行

linux - 使用带有配置文件的 ssh 命令在远程机器上执行 shell 脚本

scp - 使用 scp 命令时出错 "bash: scp: command not found"

linux - 如果参数 = x,则终止脚本

bash - 在 unix 中按数字和字典对单个字段进行排序?