import os
def Window_to_Linux_File(window_path, Linux_path, Linux_ip, username, password):
print '>>>>>>>>>>>>>>>>>>>>>>>>>Window_to_Linux_File begin'
cmd='C:\STAF\lib\python\SBS\esxtest\pscp.exe -pw {password} {window_path} {username}@{Linux_ip}:{Linux_path}'.format(
password=password, window_path=window_path, username=username, Linux_ip=Linux_ip, Linux_path=Linux_path)
os.system(cmd)
print '<<<<<<<<<<<<<<<<<<<<<<<<<<Window_to_Linux_File end'
def Window_to_Linux_Dir(window_path, Linux_path, Linux_ip, username, password):
print '>>>>>>>>>>>>>>>>>>>>>>>>>Window_to_Linux_Dir begin'
cmd='C:\STAF\lib\python\SBS\esxtest\pscp.exe -pw {password} -r {window_path} {username}@{Linux_ip}:{Linux_path}'.format(
password=password, window_path=window_path, username=username,Linux_ip=Linux_ip, Linux_path=Linux_path)
os.system(cmd )
print '<<<<<<<<<<<<<<<<<<<<<<<<<<Window_to_Linux_Dir end'
def Linux_to_Window_File(Linux_path, window_path, Linux_ip, username, password):
print '>>>>>>>>>>>>>>>>>>>>>>>>>Linux_to_Window_File begin'
cmd='C:\STAF\lib\python\SBS\esxtest\pscp.exe -pw {password} {username}@{Linux_ip}:{Linux_path} {window_path}'.format(
password=password, username=username,Linux_ip=Linux_ip, Linux_path=Linux_path, window_path=window_path)
os.system(cmd )
print '<<<<<<<<<<<<<<<<<<<<<<<<<<Linux_to_Window_File end'
def Linux_to_Window_Dir(Linux_path, window_path, Linux_ip, username, password):
print '>>>>>>>>>>>>>>>>>>>>>>>>>Linux_to_Window_Dir begin'
cmd='C:\STAF\lib\python\SBS\esxtest\pscp.exe -pw {password} -r {username}@{Linux_ip}:{Linux_path} {window_path}'.format(
password=password, username=username,Linux_ip=Linux_ip, Linux_path=Linux_path, window_path=window_path)
os.system(cmd)
print '<<<<<<<<<<<<<<<<<<<<<<<<<<Linux_to_Window_Dir end'
if __name__ == '__main__':
password='*****'
window_path=r'D:'
username='****'
Linux_ip='10.**.***.***'
Linux_path=r'/var/backup'
Window_to_Linux_File(window_path, Linux_path, Linux_ip, username, password)
#Window_to_Linux_Dir(window_path, Linux_path, Linux_ip, username, password)
#Linux_to_Window_File(Linux_path, window_path, Linux_ip, username, password))
#Linux_to_Window_Dir(Linux_path, window_path, Linux_ip, username, password)
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有