Journalctl:端末でテキストが切り取られるのを防ぐ方法

Journalctl:端末でテキストが切り取られるのを防ぐ方法

端末で長い文字列が切り取られるのを防ぐ方法は?たとえば、私が実行した場合

journalctl -xn

読めないテキストが多すぎました。私は他のプログラム/ツールを使うことに興味があります。

ベストアンサー1

journalctlマンページから:

   The output is paged through less by default, and long lines are
   "truncated" to screen width. The hidden part can be viewed by using the
   left-arrow and right-arrow keys. Paging can be disabled; see the
   --no-pager option and the "Environment" section below.

左右の矢印キーを頻繁に使用したくない場合は、次に直接パイプするだけですless

$ journalctl -xn | less

これにより、端末と比較して長すぎる行がラップされます(デフォルトの動作lessjournalctl上書きされます)。

あるいは、もちろん、端末のロールバック機能を使用する必要がある場合は、ポケットベルをまったく使用できません。

$ journalctl -xn --no-pager

おすすめ記事