UNIXのtailコマンドがログを表示するのに便利。
Windows用のtailコマンドは、
http://unxutils.sourceforge.net/(ダウンロードはリンク切れ?)
GUIベースは
http://tailforwin32.sourceforge.net/
tail -f [ファイル]
tailのヘルプ
使用法: tail [オプション]... [ファイル]...
各々の FILE の最後の 10 行を標準出力に書き出します.
複数の FILE が指定された場合は, ファイル名がヘッダ情報として出力されます.
FILE が指定されないか, FILE が - の場合は, 標準入力が読まれます.
長いオプションに必須の引数は短いオプションにも必須です.
--retry keep trying to open a file even if it is
inaccessible when tail starts or if it becomes
inaccessible later; useful when following by name,
i.e., with --follow=name
-c, --bytes=N output the last N bytes
-f, --follow[={name|descriptor}]
ファイルが大きくなるたびに追加されたデータを出力
-f, --follow および --follow=descriptor は同じ
-F --follow=name --retry と同じ
-n, --lines=N 最後の 10 行ではなく N 行を出力
--max-unchanged-stats=N
--follow=name とともに使い, 入力ファイルが削除
されていたり名前が変更されていないかどうかの確認を
N (標準 5) 回繰り返した後に大きさが変わっていない
ファイルを再度開く (これは rotate されたログ
ファイルなどに有効である)
--pid=PID with -f, terminate after process ID, PID dies
-q, --quiet, --silent never output headers giving file names
-s, --sleep-interval=S with -f, sleep for approximately S seconds
(default 1.0) between iterations.
-v, --verbose always output headers giving file names
--help この使い方を表示して終了
--version バージョン情報を表示して終了
If the first character of N (the number of bytes or lines) is a `+',
print beginning with the Nth item from the start of each file, otherwise,
print the last N items in the file. N may have a multiplier suffix:
b 512, k 1024, m 1024*1024.
--follow (-f) を指定すると, tail は標準でファイル記述子を追尾します. つまり
tail されたファイルの名前が変更されても, tail はその終端を追いかけ続けます. この標準の動作は, ファイル記述子ではなく, そのファイルの実態を追いかけたい場合
には好ましくありません (例えばログの rotate など). この場合は --follow=name を
を使ってください. これにより tail コマンドは, 何か他のプログラムによって
ファイルが削除されたり再作成されたかどうかを調べて定期的にファイルを開き直す
ことで, その名前のファイルを追いかけるようになります.
Windows