在Linux1用sftp给Linux2传几个文件,Linux2会把文件处理,然后删掉。 Linux1必须等Linux2处理完了,用sftp再传相同文件名的几个文件。 问题是Linux1怎么能知道上次传过去的文件在Linux2已经删除了?能用ls命令查看,可是没有逻辑判断啊:意思就是,if ls Linux2 有文件,就sleep,等下再ls,直到发现Linux2的文件没了,再传文件,可以这样么? sftp命令是batch方式在脚本中调用的。
bash-2.05$ more sftp.sh
#!/bin/bash
dat=`TZ=$TZ+16 date +%Y%m%d`
HOST=10.0.0.11
USER=ma_log
PASSWORD=log_ma
echo "Starting to sftp"
sftp -u ${USER},${PASSWORD} sftp://${HOST} <
本帖最后由 liyihongcug 于 2011-06-02 15:33 编辑 在windows 或者 linux 最好不用文件共享方式 用 ftp协议要快太多 ftp-------这个不太好好装 需要打开默认的 ftp服务 现在机器很难找到 或者被禁止装 如果是在要serv-U sftp 一、什么是sftp? 一般来说两台机器间的文件传输,除了常用的ftp以外,还可以通过scp/sftp协议(就是本文介绍的sftp)进行。下面我们就来看看sftp协议与ftp协议之间的差别。 (1)和ftp不...
Hi All, Need some helps here. I'm trying to write a sftp script in unix env to upload my files to the server. On top of it, I need to have the logic to check whether all files are successful uploaded to the server or not. Anyone knows how to do this? Spent few days searching Internet but no luck, couldn't get the solution :(
Hi All,\r\n\r\nNeed some helps here. I\'m trying to write a sftp script in unix env to upload my files to the server. On top of it, I need to have the logic to check whether all files are successful uploaded to the server or not. Anyone knows how to do this? Spent few days searching Internet but no luck, couldn\'t get the solution :(
想作1个类winscp,目前只作出1个通过sftp浏览远程服务器的界面,如有希望,继续无谓的努力: 1. 看看sort怎么折腾 2. 加几个菜单选项 ========================================================== import wx import sys,glob,random,os,re import paramiko import socket,stat,time import _winreg as winreg import traceback,StringIO def sftp(host,user,passwd,port=22): mysock = socket.socket(socket.AF_INET...
在aix下使用sftp时, 怎么样才能屏蔽输入用户密码(不使用key的方式进行登陆认证)\r\n如: sftp [email]user@10.1.1.1[/email] 这个时候必须手动输入密码,才能完成登陆 不知有没其他方式能将这一系列 命令写入脚本 实现自动的登陆 上传 下载 。\r\n 补: sftp -b batchfile [email]user@10.1.1.1[/email] 只支持双方key认证的方式实现。\r\n 请高手指教!! tks!
linux版本:Linux version 2.6.9-42.ELsmp ([email]bhcompile@hs20-bc1-1.build.redhat.com[/email]) (gcc version 3.4.6 20060404 (Red Hat 3.4.6-2)) #1 SMP Wed Jul 12 23:27:17 EDT 2006 在windows XP 下先安装了SSHSecureShellClient-3.2.9.exe连接linux服务器正常并成功上传了需要安装的文件。 一同事说Xshell比较好用,就安装了Xshell和xftp,在Xshell下将需要安装的文件安装成功。第二天需要上传文件(...
13> {ok,X,Y}=ssh_sftp:start_channel("192.168.16.1",[{user,"root"}]). ssh password: ** exception error: no match of right hand side value {error, "server failed to start sftp subsystem"}
本帖最后由 chendeshen 于 2014-08-13 12:51 编辑 aix 6.1 local put 文件 到 remote: sftp> put /123/456/789.txt Uploading /123/456/789.txt to /backup/123/456/789.txt remote open(" /backup/123/456/789.txt"): Failure sftp> 在 remote 上 get local 的 文件 sftp> get 789.txt Fetching /123/456/789.txt to 789.txt Couldn't open local file "789.txt" for writing: Invalid file system cont...