ssh接続切断等で screen 復帰方法 を一行で。

$ screen -ls
There is a screen on:
56426.pts-0.vps60 (Attached)
1 Socket in /var/run/screen/S-xxxxx.

$ screen -D 56426
[56426.pts-0.vps60 power detached.]

$ screen -r

screenを終了せずに、接続切断してしまった場合等、screen -r で復帰出来ないので
一度残っているscreenをログアウトします。power detachedで。
その後、screen -rで復帰します。

を一行で。

$ screen -ls|awk '{if( $0~/pts/ ){gsub(".pts.*","",$0);gsub("[\t ]+","",$0);print $0;}}'|xargs screen -D |screen -r

This entry was posted on 木曜日, 11月 21st, 2013 at 8:41 AM and is filed under ssh. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Unityによるゲームを公開しております iOS/Android
https://itunes.apple.com/jp/app/lost-knight-3d-action/id900917032
https://play.google.com/store/apps/details?id=com.groundroad.runknight

各種開発支援・機能開発等小さいお仕事などもお請けしております。
unity開発支援, PHPシステム開発, javascript/html5 フロント開発, titanium mobileアプリ開発
お気軽にお問い合わせください
大崎・五反田近郊での対面でのお打ち合わせはいつでも可能です。