$ net use t: "\\vboxsrv\v-root"
System error 53 has occurred.
The network path was not found.
$ net use t: \\vboxsrv\v-root
$ net use t: \\\\vboxsrv\\v-root
我尝试创建一个包含工作DOS命令的BAT脚本,并从Cygwin执行它。他们都因相同的错误而失败。 我需要通过Cygwin进行操作,因为我通过SSH访问系统,并降落在Cygwin环境中。如果有任何方法可以暂时从Cygwin内暂时“突破” Cygwin,那可能是一种方法。
我想念什么?
在某处创建了一个文件夹,例如:
$> mkdir -p /mnt/t
现在您可以在Cygwin的坐骑程序,就像这样:
$> mount \\vboxsrv\v-root /mnt/t
easyAS 1,2,3 :-)
通常在
/cygdrive/
下某种程度上发现Windows root路径。尝试类似的东西
$ net use t: /cygdrive/c/vboxsrv/v-root
对于此错误,
!)使用“
shared
是一个文件夹名称,我们必须共享的文件夹),授予主机共享文件夹的全部权利。)!!)在访问共享文件夹之前在VirtualBox中打开访客。 !!!)单击
start,右键单击
映射网络驱动器
”!v)在该选择中选择任何驱动器,然后在该类型的文件夹“ \ yourhostipaddress \shared”中亮呼。 bellow选择“与凭据连接”(yourhostipaddress是主机IP地址,
Shared是主机侧的共享文件夹名称。)
v)单击连接按钮。它会要求您托管用户名和密码。
Put **USERNAME** Properly like "**XXXXXXXX-PC**".
!)它将成功映射共享驱动器!!!!!!!!!!!!!!!!!!!!!!!!!!!! 如果仍然遇到错误,请放置评论bellow。 直接或通过BASH或其他Cygwin或MSYS UNIX式外壳通过CMD运行Windows命令可能会很乏味,可以理解和预测,何时试图将Windows本机拼写和转换后的拼写之间的路径转换。通过命令行处理获得“ DOS样式”选项,我最困难,因为从前斜线开始,它们看起来像Unix样式路径。对于Otthers来说,还有其他细微差别可能更难记住。 对于我来说,我发现将Windows命令作为单个引号之间的字符串写出最容易,然后使用“
e.g.
cmd <<<'net use t: \\vboxsrv\v-root'
或制作可重复使用的bash功能:
function dos() {
cmd <<<"$@"
echo "" # (because the last line ending tends to fall off)
}
dos 'net use t: \\vboxsrv\v_root'
dos dir /s
dir /s
(无法访问'/s').
我注意到,由于某些次要原因,当我使用自己的UNC路径之一测试时,“净使用”命令对我不起作用。我不知道为什么不这样做,但是也许您想尝试subst
trone this:
如果您不介意在cygwin/msys情况下没有“执行”等价性,则可能也想尝试一下:
mount -o binary,acl,posix=0,notexec,user T: /t
<<<". has felt like the simplest way to manage these situations. A single string that does not begin with a drive letter or a slash, it won't be tampered with, and CMD will split the command at the spaces. While there probably is a way to make the sh-style shell interpret the "net" command by itself with correctly spelled arguments, I just haven't been able to keep track.
通常,在新 / T /路径中的
ls -l
目录列表非常慢,在这些情况下,读取每个文件的第一个字节以检查
#!
并将文件显示为可执行文件。在本地驱动器上,这很好,但是从我的经验中,它在网络驱动器上引入的延迟并不实用。