Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6123
  • 博文数量: 2
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 30
  • 用 户 组: 普通用户
  • 注册时间: 2014-05-06 08:45
文章分类

全部博文(2)

文章存档

2015年(2)

我的朋友
最近访客

分类: LINUX

2015-07-29 14:31:02

from subprocess import call
import sys
source="/TIVOLI/pythontest/" --注意最后 /是必须的  否则会 同步到pythontest1的子目录里面 
target="/TIVOLI/pythontest1"
rsync="rsync"
arg="-a"
cmd="%s %s %s %s"%(rsync,arg,source,target)
def sync():
        ret=call(cmd,shell=True)
        if ret !=0:
                print "rsync failed"
                sys.exit(1)
sync()
阅读(450) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:浅谈bash与ksh数组使用之异同

给主人留下些什么吧!~~