[英]Move file from windows 10 to ubuntu folder using gitbash terminal
I am using Ubuntu on windows 10 and I need to move a file from a windows folder into ubuntu folder using the git bash terminal. I am using Ubuntu on windows 10 and I need to move a file from a windows folder into ubuntu folder using the git bash terminal.
How would I do this?我该怎么做?
You should move the file from within Ubuntu, not the other way around, because if you copy from Windows to Ubuntu, you will run into permissions errors.您应该从 Ubuntu 中移动文件,而不是相反,因为如果您从 Windows 复制到 Ubuntu,您将遇到权限错误。
Sources:资料来源:
See this for the solution: Copy Files from Windows to the Ubuntu Subsystem请参阅此解决方案: 将文件从 Windows 复制到 Ubuntu 子系统
So the moving would be from within the ubuntu shell something like:因此,移动将来自 ubuntu shell 内部,例如:
mv /mnt/<windows_drive_letter>/<path>/<filename> .
Actually, I'm not sure why, but you cannot move a folder from windows to WSL.实际上,我不确定为什么,但是您不能将文件夹从 windows 移动到 WSL。 It causes permission denied error on removing process (moving consists of copy & remove).它会在删除过程中导致权限被拒绝错误(移动包括复制和删除)。 But you can copy it instead using BASH.但是您可以使用 BASH 来复制它。
Steps:脚步:
C://Users/Admin/
)将您的文件夹放在用户目录中(例如C://Users/Admin/
)cp -r /mnt/c/Users/Admin/AFolder ./FolderInWSL/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.