2002-08-03 @ 08:33:48
· 作者 volcano · 归类于 EDITPLUS
在psftp(sftp的命令行客户端)中进行批处理操作:
1.首先建立文件->myscript.scr,内容如下:
代码片段:
cd /home/ftp/users/jeff del jam-old.tar.gz ren jam.tar.gz jam-old.tar.gz put jam.tar.gz chmod a+r jam.tar.gz quit
|
|
2.然后你可以运行下面命令行:
psftp user@hostname -b myscript.scr
myscript.scr中所写的内容就会执行下去
3.有什么用呢?在windows下写个批处理.bat,配合editplus上传文件,爽翻你
附命令行帮助:
代码片段:
PuTTY Secure File Transfer (SFTP) client Release 0.56 Usage: psftp [options] [user@]host Options: -b file use specified batchfile -bc output batchfile commands -be don’t stop batchfile processing if errors -v show verbose messages -load sessname Load settings from saved session -l user connect with specified username -P port connect to specified port -pw passw login with specified password -1 -2 force use of particular SSH protocol version -C enable compression -i key private key file for authentication -batch disable all interactive prompts -V print version information
|
|
作者: volcano 发表于8月 3, 2002 at 8:33 am
版权信息: 可以任意转载, 转载时请务必以超链接形式标明文章原始出处和作者信息及此声明
永久链接 - http://www.ooso.net/index.php/archives/59