bash - cp : cannot stat `/vol/examples/tutorial/science.txt' : No such file or directory

标签 bash unix cygwin

<分区>

我尝试了一个命令 cp/vol/examples/tutorial/science.txt . 我得到了错误 -

cp: cannot stat `/vol/examples/tutorial/science.txt': 没有那个文件或目录

我不明白为什么会这样。我去了 cygwin 主文件夹并创建了必要的文件夹结构和文本文件。我还检查了文件夹结构和名称。那么,为什么它不起作用?

最佳答案

你说你

went to cygwin home folder and created the necessary folder structure and text file

因此您要复制的文件不在 /vol/examples/tutorial/ 中但在 ~/vol/examples/tutorial/ . ~是您的 cygwin 主目录的缩写,通常是 /home/<username> .

您应该能够按照 user000001 所说的那样复制文件:cp ~/vol/examples/tutorial/science.txt .

关于bash - cp : cannot stat `/vol/examples/tutorial/science.txt' : No such file or directory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17842225/

相关文章:

linux - 获取下周星期二和星期三,使用 Linux date 命令

c++ - 从另一个应用程序在 Cygwin 中运行 bash 命令

bash - 排序和删除一行中的重复单词

python - 从标准输入管道到 bash 脚本中的 python 代码

linux - Bash 等待多个同时的子进程并在出错时杀死所有子进程

linux - Bash 脚本搜索文件并在使用通配符在文件中找到字符串时替换

linux - Bash:循环从 CSV 中一次读取 N 行

python - 如何在 Cygwin 上运行可执行文件

安卓NDK调试: armeabi-v7a not working

bash - 通过 grep 查找文本并用 sed 替换该文本的路径