scp user@remote:/path/to/directory local_path 执行上述命令时可能会报“not a regular file”的错误,因为我们试图复制一个目录。 3. 解决方案 💡 面对这个错误,我们有几种解决方法: 3.1 使用-r选项复制目录 📁 如果你确实想要复制一个目录,你可以使用-r选项。 代码语言:javascript 代码运行次
scp user@remote:/path/to/directory local_path 执行上述命令时可能会报“not a regular file”的错误,因为我们试图复制一个目录。 3. 解决方案 💡 面对这个错误,我们有几种解决方法: 3.1 使用-r选项复制目录 📁 如果你确实想要复制一个目录,你可以使用-r选项。 scp -r user@remote:/path/to/directory ...
命令:scp -P1234 /data/aa root@192.0.0..0:/data 文件结构:/data/aa/yearmonth=2015-09 报错:not a regular file 报错原因:这是一个文件夹,而不是文件,因此要加参数-r 正确命令:scp -r -P1234 /data/aa root@192.0.0..0:/data
scp: .: not a regularfile 检查多次,觉得命令没有错误,尝试远程复制到别的主机上,依旧出现此问题,无法复制 最后发现,IP地址后面的:不要加空格,直接跟上要复制的目录即可,哭。。。 1 2 3 [root@192 keepalived]# scp keepalived.conf 192.168.229.50:/etc/keepalived/ root@192.168.229.50's password: keepal...
通常和远程机器之前进行文件夹复制就是使用scp命令 ,今天在复制一个文件的时候报错提示:not a regular file 执行的命令 scp 文件 user@ip:目标地址 1. 报错 not a regular file 1. 参考Linux scp命令解决 -r: 递归复制整个目录。 即执行的命令 scp -r 文件 user@ip:目标地址 ...
cp报错:not a regular file 原因是 这样是相当于下载文件夹,而非文件。 解决办法是 加参数 -r scp -r liujia@172.16.252.32:/user/liujia/ /home/liujia 这样就可以了,如果不行, 有可能没权限 chmod 777 scp提供了几个选项 在scp后加就行了
在linux上使用"scp"命令拷贝一个目录到另一台服务器的时候报"not a regular file"错误的解决办法 2017-01-03 00:05 −今天在linux命令行使用scp命令拷贝一个目录到另一台服务器的时候,报如下错误: [root@hadoop01 ~]# scp flume -r hadoop02:/root/apps flume: not a regular file -r: No such file...
scp报错:not a regular file,scp报错:notaregularfile用scp拷贝文件夹的时候会出现这个错误解决办法:加个-r的参数就行了如:#scp-r/mnt root@127.0.0.1:/home
复制本地linux文件到远程服务器 {代码...} 复制远程服务器的文件到本地 {代码...} 出现not a regular file 错误 是因为复制的不是一个文件而是一个文件夹,需...
2 从远程主机上复制文件到本机scp vagrant@xxx:/apps/test/test.tar.gz ./ 3 从本机复制文件到远程主机上scp test.tar.gz vagrant@xxx:/apps/test/ 4 如果复制的目录,目录下面有文件,这种情况如果还像上面那样复制的话会失败scp: /apps/test/logs: not a regular file 5 对于复制目录文件,需要带-r...