V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
keximing250
V2EX  ›  程序员

求助, expect 的问题

  •  
  •   keximing250 · Mar 6, 2018 · 2598 views
    This topic created in 2986 days ago, the information mentioned may be changed or developed.

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

    源码:

    测试啊 问题: 测试啊

    7 replies    2018-03-08 15:01:45 +08:00
    keximing250
        1
    keximing250  
    OP
       Mar 6, 2018
    顶一下~
    ant2017
        2
    ant2017  
       Mar 6, 2018 via Android
    FTP 不是用 rename 吗
    keximing250
        3
    keximing250  
    OP
       Mar 6, 2018
    @ant2017 mv 改成 rename 么
    omph
        4
    omph  
       Mar 6, 2018
    进到 ftp 里,打个?,就知道支持哪些操作了
    araraloren
        5
    araraloren  
       Mar 6, 2018
    It already told you `mv` is invalid command .
    keximing250
        6
    keximing250  
    OP
       Mar 6, 2018
    @araraloren 知道了 进入 ftp 模式了
    linyinma
        7
    linyinma  
       Mar 8, 2018
    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
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1325 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 17:30 · PVG 01:30 · LAX 10:30 · JFK 13:30
    ♥ Do have faith in what you're doing.