私は数日間GNUスクリーンセッションを実行してきました。私は端末の内容(上にスクロールして見ることができます)をファイルに保存する必要がある状況にありました。可能ですか? 5000行を超えないと予想されます。
画面録画を設定する方法を見つけました未来ファイルに出力します。ただし、この場合は、過去の出力(またはできるだけ多くの既存の出力)も保存する必要があります。
ベストアンサー1
hardcopy -h
コマンドを使用して、現在のスクロールバッファの内容をファイルに保存できます。に記載されているようにman screen
:
hardcopy [-h] [file] Writes out the currently displayed image to the file file, or, if no filename is specified, to hardcopy.n in the default directory, where n is the number of the current window. This either appends or overwrites the file if it exists. See below. If the option -h is specified, dump also the contents of the scrollback buffer.
あなたは言う:
5000行を超えないと予想されます。
5000行は本当に大量です。スクロールバッファのデフォルトの長さは、
screen
5000行ではなく100行です。より大きなスクロールバッファ設定でセッションを開始しないと、
screen
約5000行のスクロールバッファはすべて取得されません。