定时从linux获取信息放到windows上
环境:windows上代码路径下存放:WinSCP-5.13.8-Setup.exe
第一步:test.txt 拉取脚本的txt文本
解析:存放从linux路径下拉取所需源文件zyy_count.result
到本地windows的目标路劲改下:D:\zyy\XNresult\
option echo off
option batch on
option confirm off
open scp://root:Uxsino_test@192.168.1.122
cd /home/zyy#进入linux的源文件路径
get zyy_cpu_mem.result D:\zyy\XNresult\
get zyy_count.result D:\zyy\XNresult\
open scp://root:Uxsino_test@192.168.1.122
cd /home/simo
get simo_cpu_mem.result D:\SIMO\XNresult\121\
get simo_count.result D:\SIMO\XNresult\121\
option transfer binary
option synchdelete off
close
exit
第二步:主程序将移动脚本文件通过winscp.exe工具移动
move.bat
解析:通过winscp.exe执行上面的test.txt的脚本文件
并将执行日志存放到 /log=D:\SIMO\XNresult\log.txt
@echo off
start /d "D:\profile\WinSCP" WinSCP.exe /y /console /script=D:\SIMO\XNresult\test.txt /log=D:\SIMO\XNresult\log.txt
set /a "Ymd=%date:~,4%%date:~5,2%%date:~8,2%"
move D:\SIMO\XNresult\simo_count.result "D:\SIMO\XNresult\simo_count.result%Ymd%"
move D:\SIMO\XNresult\simo_cpu_mem.result "D:\SIMO\XNresult\simo_cpu_mem.result%Ymd%"
move D:\SIMO\XNresult\122\simo_cpu_mem.result "D:\SIMO\XNresult\122\simo_cpu_mem.result%Ymd%"
move D:\SIMO\XNresult\122\simo_count.result "D:\SIMO\XNresult\122\simo_count.result%Ymd%"
第三步:设置windows自带的计划任务 执行 move.bat脚本
定时从linux获取信息放到windows上的更多相关文章
- 关于Python在Linux、Mac和Windows上的安装方法总结
一.Linux下安装python 1.python源码安装包下载地址: https://www.python.org/downloads/source/ 2.下载完tar.xz压缩包以后, ...
- [C#]获取最近在Windows上所使用的文件
class RecentlyFileHelper { public static string GetShortcutTargetFile(string shortcutFilename) { var ...
- Windows上的Linux容器
翻译自:https://docs.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/linux-contai ...
- rsync (windows 服务端,linux客户端)将windows上的数据同步到linux服务器,反之也可
一:总体概述. 1.windows上面首先装CW_rsync_Server.4.1.0_installer,安装时要输入的用户名密码要记住哦!接下来就是找到rsyncd.conf进入配置细节 2.li ...
- Windows 上 GitHub Desktop 的操作[转]
第1章 上传开源代码至GitHub 1 1.1 git Windows 客户端 1 1.2 注册GitHub账户 2 1.3 登录 2 1.4 创建本地代码仓库 2 1. ...
- Windows 上 GitHub Desktop 的操作
目 录 第1章 上传开源代码至GitHub 1 1.1 git Windows 客户端 1 1.2 注册GitHub账户 2 1.3 登录 2 1.4 创建本地代码仓库 ...
- C/C++获取操作系统、CPU、内存信息(windows和linux)
有时候需要在工程里面获取一些系统或者硬件的信息,比如系统版本,cpu,内存,显卡,硬盘等,作为后续软件功能判断的依据,甚至参与性能算法自适应建模 Windows 操作系统和内存信息在windows下通 ...
- 深入体验bash on windows,在windows上搭建原生的linux开发环境,酷!
今年微软Build 2016大会最让开发人员兴奋的消息之一,就是在Windows上可以原生运行Linux bash,对开发人员来说,这是一个喜闻乐见的消息. 1 安装 你必须安装开发者预览版本,才能使 ...
- 如何实现在Windows上运行Linux程序,附示例代码
微软在去年发布了Bash On Windows, 这项技术允许在Windows上运行Linux程序, 我相信已经有很多文章解释过Bash On Windows的原理, 而今天的这篇文章将会讲解如何自己 ...
随机推荐
- WINAPI与CALLBACK
#define WINAPI __stdcall #define CALLBACK __stdcall 都是__stdcall,无本质区别. CALLBACK只是为了告诉我们这是一个回调函数.
- Django rest-framework框架-CBV原理
jdango中间件:class Test(View): def dispatch(self, request, *args, **kwargs): #第一种方法 func = getattr(self ...
- Python 针对Excel操作
1.python 读取Excel # -*- coding: utf-8 -*- import xlrd import os,sys reload(sys) sys.setdefaultencodin ...
- C#面向对象 (访问修饰符、封装、继承、多态)
先看一下创建一个新项目时的基本格式 using System; using System.Collections.Generic; using System.Linq; //引用的命名空间 using ...
- 前端基础(八):Font Awesome(图标)
一.font awesome简介 目前图标总数共有519个; 不依赖Javascript 矢量图形,无限缩放 免费,可用于商业 CSS控制样式,自定义图标颜色,大小,阴影,一切可能实现的效果 支持re ...
- asp.net 设计音乐网站
第一步 收集资料 http://www.logoko.com.cn/ --设计logo网站 设计音乐文档 https://wenku.baidu.com/view/3d957617f18583 ...
- intellij idea打包出来的jar包,运行时中文乱码
比如以下代码: import javax.swing.*; public class addJarPkg { public static void main(String[] args) { JFra ...
- Web SQL与indexedDB
虽然在HTML5 WebStorage介绍了html5本地存储的Local Storage和Session Storage,这两个是以键值对存储的解决方案,存储少量数据结构很有用,但是对于大量结构化数 ...
- JavaScript 基础知识梳理——事件
事件 1)事件是文档或浏览器窗口中发生的特定的交互瞬间. JavaScript和HTML之间的交互是通过事件实现的. 2)事件流——描述的是从页面中接受事件的顺序 IE——事件冒泡流 Netscape ...
- FFmpeg常用命令学习笔记(一)基本信息查询命令
笔者才开始学习音视频开发,FFmpeg学习笔记系列主要是从慕课网李超老师的FFmpeg音视频核心技术精讲与实战课程学习的心得体会. FFmpeg音视频核心技术精讲与实战:https://coding. ...