![tail -fを置き換えてスクロールを簡単にする方法はありますか? [コピー]](https://linux33.com/image/33653/tail%20-f%E3%82%92%E7%BD%AE%E3%81%8D%E6%8F%9B%E3%81%88%E3%81%A6%E3%82%B9%E3%82%AF%E3%83%AD%E3%83%BC%E3%83%AB%E3%82%92%E7%B0%A1%E5%8D%98%E3%81%AB%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95%E3%81%AF%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%81%8B%EF%BC%9F%20%5B%E3%82%B3%E3%83%94%E3%83%BC%5D.png)
私は通常GNU Screen程度にいますがtmux
、これは私に素晴らしいスクロール機能を提供しません。tail -f
すばやくスクロールできる他の方法はありますか?
同様のツールはとmost
です。less
more
この問題関連性がありますが、具体的ではありません。私は本当に私を転がすことができる何かを探しています。
答え1
less +F
「永久に進む」モードでは、少なく開始できます。このモードでは、このless
ように動作し、tail -f
ファイルの終わりを無視し、安定したテキストストリームを提供します。
スクロールするには、を押しますCtrlc。永久転送モードに戻すには、を押しますF。
答え2
それからあなたは利用可能です
tail -f <file> | less
これにより、両方の世界の利点を享受することができます!
答え3
また、使用することができます
watch -n 10 cat <file>
男性用時計:
watch - execute a program periodically, showing output fullscreen
SYNOPSIS
watch [-dhvt] [-n <seconds>] [--differences[=cumulative]] [--help] [--interval=<seconds>] [--no-title]
[--version] <command>
DESCRIPTION
watch runs command repeatedly, displaying its output (the first screenfull). This allows you to watch the
program output change over time. By default, the program is run every 2 seconds; use -n or --interval to
specify a different interval.
The -d or --differences flag will highlight the differences between successive updates. The --cumulative
option makes highlighting "sticky", presenting a running display of all positions that have ever changed.
The -t or --no-title option turns off the header showing the interval, command, and current time at the
top of the display, as well as the following blank line.
答え4
less
私はほとんどいつもこの目的に使用します。私は「永遠に進む」モードを使用したことがなく、スクロールにはランタイムless
ショートカットだけを使用しました。
< - Scroll to beginning of stream
> - Scroll to end of stream
ファイルからバッファを読み込み、最初にファイルを開いた後にファイルに新しいコンテンツが追加された場合は、「永続転送」モードではない場合でも、次回ファイルをクリックすると新しいless
コンテンツが表示されます。>