• <i id='c8b2q'></i>
  • <acronym id='c8b2q'><em id='c8b2q'></em><td id='c8b2q'><div id='c8b2q'></div></td></acronym><address id='c8b2q'><big id='c8b2q'><big id='c8b2q'></big><legend id='c8b2q'></legend></big></address><span id='c8b2q'></span>

  • <tr id='c8b2q'><strong id='c8b2q'></strong><small id='c8b2q'></small><button id='c8b2q'></button><li id='c8b2q'><noscript id='c8b2q'><big id='c8b2q'></big><dt id='c8b2q'></dt></noscript></li></tr><ol id='c8b2q'><table id='c8b2q'><blockquote id='c8b2q'><tbody id='c8b2q'></tbody></blockquote></table></ol><u id='c8b2q'></u><kbd id='c8b2q'><kbd id='c8b2q'></kbd></kbd>

      <code id='c8b2q'><strong id='c8b2q'></strong></code>
      <i id='c8b2q'><div id='c8b2q'><ins id='c8b2q'></ins></div></i>
      <dl id='c8b2q'></dl>

        <ins id='c8b2q'></ins>

            <fieldset id='c8b2q'></fieldset>

            SSH登录linux妙用后台命令

            • 时间:
            • 浏览:2
            • 来源:124软件资讯网

              用SSH治理linux服务器,有时可能要下载点大的软件或者文件包.又或者要打包一个上5G的文件夹,那是何等漫长的等候.

              更贫苦的是,下载的时间若是SSH 客户端N久没行动会断掉毗连,于是下载到一半的工具也会随着死掉.

              固然,你说我可以打开多个SSH客户窗口来操作,那我不得不说,这是个笨措施.

              好比我想打包一个文件夹,可以用如下的下令

              #tar zcvf file.tar.gz /path/document/*

              不想等,就把他放到后台去(后面加个&)

              #tar zcvf file.tar.gz /path/document/* &

              若是你要回来.就使用fg 下令

              我们想固然的,下载也是这样

              #wget http://www.phpv.net/file.tar.gz &

              但若是你超时或者有事脱离而退出SSH 那正在下载的file.tar.gz 文件也会随之停下了...

              怎么办?让我们用nohup 来完成/

              NAME
              nohup - run a command immune to hangups, with output to a non-tty

              SYNOPSIS
              nohup COMMAND [ARG]...
              nohup OPTION

              DESCRIPTION
              Run COMMAND, ignoring hangup signals.

              --help display this help and exit

              --version
              output version information and exit

              REPORTING BUGS
              Report bugs to .

              SEE ALSO
              The full documentation for nohup is maintained as a Texinfo manual. If
              the info and nohup programs are properly installed at your site, the
              command

              info nohup

              should give you access to the complete manual.

              以上是man nohup出来的.

              用法很简朴,就在下令前加 nohup

              #nohup wget http://www.phpv.net/file.tar.gz

              nohup: appending output to `nohup.out'

              没反映...死机了?

              CTRL+Z 回到下令行模式...

              要制止上面的要领,就加个 & 在下令后面

              #nohup wget http://www.phpv.net/file.tar.gz &

              #

              好了.现在随便你怎样exit,睡一觉回来看,什么事情都完成了