V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
keximing250
V2EX  ›  程序员

求助, expect 的问题

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

    用 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   ·   我们的愿景   ·   实用小工具   ·   5217 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 08:43 · PVG 16:43 · LAX 01:43 · JFK 04:43
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.