什么是cp:在Unix中无法统计错误,尝试将内容从一个文件夹复制到另一个文件夹时出现此错误 [英] What is cp: cannot stat error in Unix, I get this error when trying to copy thing from one folder to another

查看:68
本文介绍了什么是cp:在Unix中无法统计错误,尝试将内容从一个文件夹复制到另一个文件夹时出现此错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我想知道为什么会出现此错误。我有一个名为模拟的目录,里面还有另外3个目录。我正在尝试使用下面的代码将所有项目从模拟目录复制到projweek目录。

Hi I wanted to know why I am getting this error. I have this directory called mock, which inside has another 3 directories. I am trying to copy all the items from mock directory into the projweek directory using the below code.

cp  /mock/* ~/projweek

但是我收到此错误

cp: cannot stat ‘mock/*’: No such file or directory

关于为什么的任何想法?

any ideas as to why that is?

推荐答案

如果您的源目录设置为引号,则请确保 * 在引号之外,即

If your source directory is set in quotes, then make sure that the * is outside the quotes, i.e.

cp "source/"* dest

cp "source"/* dest

这篇关于什么是cp:在Unix中无法统计错误,尝试将内容从一个文件夹复制到另一个文件夹时出现此错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆