shell脚本将文件从特定位置(UNIX服务器)复制到远程位置(Windows服务器) [英] shell script which copies a file from a particular location(UNIX server) to a remote location(windows server)

查看:543
本文介绍了shell脚本将文件从特定位置(UNIX服务器)复制到远程位置(Windows服务器)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要编写一个shell脚本,将UNIX服务器中某个位置的文件复制到指定位置的远程windows服务器。我是UNIX的新手。请告知如何做到这一点。根据Unix的风格,您可能能够安装Samba(或者已经拥有它安装)。然后你可以做的是:

$ ul

  • 在你的Windows上共享目标驱动器

  • 安装共享使用其UNC(即/ /服务器名/共享名)



  • 使用正常 cp 复制文件



    请参阅 mount.cifs Samba文档

    I need to write a shell script which copies a file present at a location in UNIX server to a remote windows server with specified location. I am a novice in UNIX. Please advise how to do that.

    解决方案

    Depending on the flavour of Unix, you may be able to install Samba (or already have it installed). Then what you can do is:

    • Share the target drive on your Windows back
    • Mount the share using its UNC (i.e. //servername/sharename)

    Use normal cp to copy the files

    See mount.cifs and Samba Docs

    这篇关于shell脚本将文件从特定位置(UNIX服务器)复制到远程位置(Windows服务器)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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