sshでログイン ↓ vimでファイル編集 ↓ ssh切れる ↓ ssh再度ログイン ↓ 再びvimでファイル編集しようとすると、.swpファイルがある ↓ psで確認すると、サーバ側でsshのセッション残ったまま こういう状態で、既にクライアント側を終了してしまったsshのセッションで起動しているvimを、いま開いているsshのセッションから横取りしたい。 こういうときはreptyrを使えばいいみたい。 インストール
Is there a way to connect to an ssh session that was disconnected? We are having problems with our network connection to a remote site that we are working on separately; however, in the mean time we experience a large number of disconnects due to lost packets while connected to servers at the remote location. Many times the session stays active for a while, and sometimes it happens to be in the mi
"reptyr PID" will grab the process with id PID and attach it to your current terminal. After attaching, the process will take input from and write output to the new terminal, including ^C and ^Z. (Unfortunately, if you background it, you will still have to run "bg" or "fg" in the old terminal. This is likely impossible to fix in a reasonable way without patching your shell.) Typical usage pattern
はじめに LinuxでCtrl-C打ったらコマンドが中断されるとか。皆さんご存知ですよね。こういうことに関連したちょっとした四択クイズです。Linux使い各位、当然、全問正解できますよね? 問題 いずれもPuTTYなりTeraTermなりのターミナルソフトでLinuxマシンにSSHで接続した、ログインシェル上での対話操作の上でのお話です。ターミナルソフトなんかは特に設定をいじらないことにします。一応。それと、シェルは大体なんでも同じだと思うのですが、念のためbashと指定しておきます。 Q1: シグナル送ったのは誰? 「はじめに」でも書きましたが、Ctrl-Cを入力すると、実行中のコマンドを停止させることができますね。例えば次のように。 これはSIGINTというシグナルが送られるためです。このシグナルはkill -INT プロセスIDなんてコマンドなんかで手動で送ることもできますね。 では
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く