xcopy,无法在Linux机器上正常使用网络

问题描述 投票:0回答:1

我正在尝试通过VPN将文件从Windows服务器复制到网络共享文件夹。这是批处理文件中的代码。正常运行,没有任何问题。

net use \\servername\test_folder password /user:user_name
xcopy C:\Apache\htdocs\arul\xias \\servername\\test_folder

但是当我尝试从Linux机器上运行它时,它无法正常工作。该Linux机器还通过VPN连接到网络共享文件夹。因此,我在下面的Linux计算机上尝试了.sh文件。

net use \\servername\test_folder password /user:user_name
cp C:\Apache\htdocs\arul\xias \\servername\\test_folder

我遇到类似net command is not found and cp: -r not specified;的错误

如何从Linux机器上实现这一点?

linux vpn xcopy
1个回答
0
投票

“ net use”和“ xcopy”命令特定于Windows,并且将在Linux上更新。您应该改用一些smb特定的命令(当然,内核必须支持它们)。

© www.soinside.com 2019 - 2024. All rights reserved.