求助, expect 的问题 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
请不要在回答技术问题时复制粘贴 AI 生成的内容
keximing250
V2EX    程序员

求助, expect 的问题

  •  
  •   keximing250 2018-03-06 16:06:14 +08:00 2271 次点击
    这是一个创建于 2784 天前的主题,其中的信息可能已经有所发展或是发生改变。

    用 expect 远程传输文件,并在远程服务器执行 mv 命令。文件成功拷贝过去 ,但是 mv 命令未执行,是什么原因啊

    源码:

    测试啊 问题: 测试啊

    7 条回复    2018-03-08 15:01:45 +08:00
    keximing250
        1
    keximing250  
    OP
       2018-03-06 16:12:44 +08:00
    顶一下~
    ant2017
        2
    ant2017  
       2018-03-06 16:31:48 +08:00 via Android
    FTP 不是用 rename 吗
    keximing250
        3
    keximing250  
    OP
       2018-03-06 16:33:25 +08:00
    @ant2017 mv 改成 rename 么
    omph
        4
    omph  
       2018-03-06 16:39:23 +08:00
    进到 ftp 里,打个?,就知道支持哪些操作了
    araraloren
        5
    araraloren  
       2018-03-06 16:45:27 +08:00
    It already told you `mv` is invalid command .
    keximing250
        6
    keximing250  
    OP
       2018-03-06 16:54:47 +08:00
    @araraloren 知道了 进入 ftp 模式了
    linyinma
        7
    linyinma  
       2018-03-08 15:01:45 +08:00
    sftp 登录后执行的命令都是 sftp 的内置命令,‘ mv ’是一个应用命令是外界命令,sftp 内置命令仅仅如下:
    sftp> help
    Available commands:
    bye Quit sftp
    cd path Change remote directory to 'path'
    chgrp grp path Change group of file 'path' to 'grp'
    chmod mode path Change permissions of file 'path' to 'mode'
    chown own path Change owner of file 'path' to 'own'
    df [-hi] [path] Display statistics for current directory or
    filesystem containing 'path'
    exit Quit sftp
    get [-afPpRr] remote [local] Download file
    reget [-fPpRr] remote [local] Resume download file
    reput [-fPpRr] [local] remote Resume upload file
    help Display this help text
    lcd path Change local directory to 'path'
    lls [ls-options [path]] Display local directory listing
    lmkdir path Create local directory
    ln [-s] oldpath newpath Link remote file (-s for symlink)
    lpwd Print local working directory
    ls [-1afhlnrSt] [path] Display remote directory listing
    lumask umask Set local umask to 'umask'
    mkdir path Create remote directory
    progress Toggle display of progress meter
    put [-afPpRr] local [remote] Upload file
    pwd Display remote working directory
    quit Quit sftp
    rename oldpath newpath Rename remote file
    rm path Delete remote file
    rmdir path Remove remote directory
    symlink oldpath newpath Symlink remote file
    version Show SFTP version
    !command Execute 'command' in local shell
    ! Escape to local shell
    ? Synonym for help
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     1566 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 35ms UTC 16:17 PVG 00:17 LAX 09:17 JFK 12:17
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86