【问题标题】:can i know abt the exit status of the scp command in unix我能知道 scp 命令在 unix 中的退出状态吗
【发布时间】:2010-10-29 14:29:39
【问题描述】:


在使用 scp 命令在 perl 中进行编程时 我被困在面对 scp 命令的退出状态
如果你告诉我哪个退出值(除了 0-成功,1-错误)是什么我的生活会很简单

【问题讨论】:

    标签: unix ssh scp


    【解决方案1】:

    来自here

    0   Operation was successful
    1   General error in file copy
    2   Destination is not directory, but it should be
    3   Maximum symlink level exceeded
    4   Connecting to host failed.
    5   Connection broken
    6   File does not exist
    7   No permission to access file.
    8   General error in sftp protocol
    9   File transfer protocol mismatch
    10  No file matches a given criteria
    65  Host not allowed to connect
    66  General error in ssh protocol
    67  Key exchange failed
    68  Reserved
    69  MAC error
    70  Compression error
    71  Service not available
    72  Protocol version not supported
    73  Host key not verifiable
    74  Connection failed
    75  Disconnected by application
    76  Too many connections
    77  Authentication cancelled by user
    78  No more authentication methods available
    79  Invalid user name
    

    【讨论】:

      【解决方案2】:

      链接:scp return codes

      【讨论】:

        【解决方案3】:

        在处理 shell 命令和类似程序时,0 几乎总是成功返回码。

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2014-02-13
          • 2018-09-18
          • 1970-01-01
          • 1970-01-01
          • 2021-10-29
          • 2021-05-31
          相关资源
          最近更新 更多