Journalctlからファイルの最後に移動する方法は?

Journalctlからファイルの最後に移動する方法は?

入力すると、sudo journalctlある種のリーダーにシステムログが表示されます。 jとkを押すとViのように動作しますが、Gはファイルの終わりに移動しません。実際にGを押すとストリームが停止し、強制終了しました。

Journalctlのマニュアルページには、リーダーの使用に関する言及はありません。

ベストアンサー1

その「読者」がまさにそれだless

Journalctlのマニュアルページには、リーダーの使用に関する言及はありません。

エラー、マニュアルページに次のように表示されます。

The output is paged through `less` by default,

しかし:

ただし、Gはファイルの終わりに達しません。実際にGを押すとストリームが停止し、強制終了しました。

Gはうまく機能しますが、ログが長すぎて最後まで検索するまで長時間検索します。

マニュアルページから:

  -e, --pager-end
      Immediately jump to the end of the journal inside the implied pager 
      tool. This implies -n1000 to guarantee that the pager will not buffer 
      logs of unbounded size. This may be overridden with an explicit -n 
      with some other numeric value, while -nall will disable this cap. 
      Note that this option is only supported for the less(1) pager.

だから、

journalctl -e

それがまさにあなたが逃げたいものです!

おすすめ記事