zoukankan      html  css  js  c++  java
  • SFTP 定时任务下载

    1、上传

    winscp.exe /console /command "option batch continue" "option confirm off" "open sftp://bypass:abc123!@192.168.150.129:22" "option transfer binary" "put D:1.txt  /tmp/" "exit" /log=log_file.txt 

    @ECHO OFF 
    cd C:Program Files (x86)WinSCP
    winscp.exe /console /command "option batch continue" "option confirm off" "open sftp://bypass:abc123!@192.168.150.129:22" "option transfer binary" "get /tmp D:	estapp" "exit" /log=log_file.txt

    2、下载

    winscp.exe /console /command "option batch continue" "option confirm off" "open sftp://bypass:abc123!@192.168.150.129:22" "option transfer binary" "get /tmp D: estapp" "exit" /log=log_file.txt

    Linux

    #! /bin/sh
    
    echo "Starting to sftp..."
    
    lftp -u root,abc123! sftp://192.168.204.130 << EOF
    cd /tmp
    mget *.*
    bye
    EOF
    
    echo "done"

    参考文章:

    https://yq.aliyun.com/articles/437616

    lftp登录sftp 自动下载某一目录下的所有文件

    https://www.cnblogs.com/binw/p/4065607.html

    WinSCP自动执行脚本

    https://blog.csdn.net/GYGuo95/article/details/80041139

    windows下 命令行+winscp 实现与linux的远程文件传输

    windows下定时利用bat脚本实现ftp上传和下载

    https://www.cnblogs.com/caizhao/p/8119888.html

  • 相关阅读:
    Owin
    C#不区分大小写的字符串替换(Replace)函数
    如何创建测试程序调试nginx数据结构
    一张脑图说清 Nginx 的主流程
    gdb常用命令记录
    nginx的configure流程
    c 编译器大全
    PHP 的 uniqid 函数产生的 id 真的是唯一的么?
    UUID那些事
    PHP 编码规范
  • 原文地址:https://www.cnblogs.com/xiaozi/p/11024567.html
Copyright © 2011-2022 走看看