使用法: tail [オプション]... [ファイル]...
各々の FILE の最後の 10 行を標準出力に書き出します.
複数の FILE が指定された場合は, ファイル名がヘッダ情報として出力されます.
FILE が指定されないか, FILE が - の場合は, 標準入力が読まれます.
長いオプションに必須の引数は短いオプションにも必須です.
-c, --bytes=K output the last K bytes; alternatively, use -c +K
to output bytes starting with the Kth of each file
-f, --follow[={name|descriptor}]
ファイルが大きくなるたびに追加されたデータを出力
-f, --follow および --follow=descriptor は同じ
-F --follow=name --retry と同じ
-n, --lines=K output the last K lines, instead of the last 10;
or use -n +K to output lines starting with the Kth
--max-unchanged-stats=N
with --follow=name, reopen a FILE which has not
changed size after N (default 5) iterations
to see if it has been unlinked or renamed
(this is the usual case of rotated log files).
With inotify, this option is rarely useful.
--pid=PID with -f, terminate after process ID, PID dies
-q, --quiet, --silent never output headers giving file names
--retry keep trying to open a file even when it is or
becomes inaccessible; useful when following by
name, i.e., with --follow=name
-s, --sleep-interval=N with -f, sleep for approximately N seconds
(default 1.0) between iterations.
With inotify and --pid=P, check process P at
least once every N seconds.
-v, --verbose always output headers giving file names
--help この使い方を表示して終了
--version バージョン情報を表示して終了
If the first character of K (the number of bytes or lines) is a `+',
print beginning with the Kth item from the start of each file, otherwise,
print the last K items in the file. K may have a multiplier suffix:
b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024,
GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y.
With --follow (-f), tail defaults to following the file descriptor, which
means that even if a tail'ed file is renamed, tail will continue to track
its end. This default behavior is not desirable when you really want to
track the actual name of the file, not the file descriptor (e.g., log
rotation). Use --follow=name in that case. That causes tail to track the
named file in a way that accommodates renaming, removal and creation.
Report tail bugs to bug-coreutils@gnu.org
GNU coreutils home page:
Usage: tail [OPTION]... [FILE]...
Print the last 10 lines of each FILE to standard output.
With more than one FILE, precede each with a header giving the file name.
With no FILE, or when FILE is -, read standard input.
Mandatory arguments to long options are mandatory for short options too.
-c, --bytes=K output the last K bytes; alternatively, use -c +K
to output bytes starting with the Kth of each file
-f, --follow[={name|descriptor}]
output appended data as the file grows;
-f, --follow, and --follow=descriptor are
equivalent
-F same as --follow=name --retry
-n, --lines=K output the last K lines, instead of the last 10;
or use -n +K to output lines starting with the Kth
--max-unchanged-stats=N
with --follow=name, reopen a FILE which has not
changed size after N (default 5) iterations
to see if it has been unlinked or renamed
(this is the usual case of rotated log files).
With inotify, this option is rarely useful.
--pid=PID with -f, terminate after process ID, PID dies
-q, --quiet, --silent never output headers giving file names
--retry keep trying to open a file even when it is or
becomes inaccessible; useful when following by
name, i.e., with --follow=name
-s, --sleep-interval=N with -f, sleep for approximately N seconds
(default 1.0) between iterations.
With inotify and --pid=P, check process P at
least once every N seconds.
-v, --verbose always output headers giving file names
--help display this help and exit
--version output version information and exit
If the first character of K (the number of bytes or lines) is a `+',
print beginning with the Kth item from the start of each file, otherwise,
print the last K items in the file. K may have a multiplier suffix:
b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024,
GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y.
With --follow (-f), tail defaults to following the file descriptor, which
means that even if a tail'ed file is renamed, tail will continue to track
its end. This default behavior is not desirable when you really want to
track the actual name of the file, not the file descriptor (e.g., log
rotation). Use --follow=name in that case. That causes tail to track the
named file in a way that accommodates renaming, removal and creation.
Report tail bugs to bug-coreutils@gnu.org
GNU coreutils home page:
TAIL(1) User Commands TAIL(1)
名前
tail - ファイルの末尾部分を表示する
書式
tail [OPTION]... [FILE]...
説明
そ れぞれの FILE の末尾 10 行を標準出力へ出力する。複数の FILE が与えら
れた場合は、与えられたファイル名をヘッダとして先に出力する。 FILE が 与
えられなかった場合、あるいは FILE が - の場合には標準入力から読み込む。
長いオプションへの必須の引数は短いオプションでも必須である。
-c, --bytes=K
末尾 K バイトを出力する; 各ファイルの K バイトから出力を開始する
には、代わりに +K を使う。
-f, --follow[={name|descriptor}]
フ ァ イ ルの内容が増え続ける時、追加されたデータを出力する; -f,
--follow と --follow=descriptor は等価である。
-F --follow=name --retry と等価である。
-n, --lines=K
末尾 10 行の代わりに末尾 K 行を出力する。
--max-unchanged-stats=N
--follow=nameと共に使用する。 FILE が削除あるいはリネームされ た
か どうかを N 回 (デフォルトは 5 回) 調べた後、サイズが変更され
ていない FILE を開き直す。 (これはローテートされたファイルによく
あるケースである)
--pid=PID
-fと共に使用する。プロセスID PID が死んだ後終了する。
-q, --quiet, --silent
与えられたファイル名をヘッダとして出力しない。
--retry
ファイルがアクセスできない、あるいはアクセスできなくなろうとして
いたとしても、ファイルのオープンを繰り返す; --follow=name で名前
で追跡している場合に有用である。
-s, --sleep-interval=N
-f と共に使用する。追跡しているファイルのチェックを N 秒毎に行う
。 (デフォルトは 1.0 秒)
-v, --verbose
与えられたファイル名を常にヘッダとして出力する。
--help このヘルプを表示して終了する。
--version
バージョン情報を表示して終了する。
もし K(バイト数あるいは行数) の最初の文字が ‘+’ である場合、それぞれ の
ファイルの先頭から K 番目の項目より表示し始める。通常はファイルの末尾 K
番目の項目より表示する。K は単位を表す文字を含むことができる: b 512, kB
1000, K 1024, MB 1000*1000, M 1024*1024, GB 1000*1000*1000, G
1024*1024*1024, T, P, E, Z, Y も然り。
--follow (-f) と共に使用すると、tail はファイル記述子を追跡する。つ ま
り、tail されたファイル名が変更されても、その終端を追跡し続ける。ファイ
ル記述子ではなく、実際のファイルの名前を追跡したい場合には、このデフ ォ
ル ト の 挙 動は好ましくない。(例えば、ログローテーションなど) この場合
、--follow=name を使用する。これにより、tail は他のプログラムによって削
除 や再作成されたかどうかを調べるために、定期的にファイルを開き直すこと
で追跡するようになる。
著者
Paul Rubin, David MacKenzie, Ian Lance Taylor そして Jim Meyering に よ
って書かれた。
バグ報告
tail のバグ報告は bug-coreutils@gnu.org へ報告してください。
GNU coreutils のホームページ:
TAIL(1) User Commands TAIL(1)
NAME
tail - output the last part of files
SYNOPSIS
tail [OPTION]... [FILE]...
DESCRIPTION
Print the last 10 lines of each FILE to standard output. With more
than one FILE, precede each with a header giving the file name. With
no FILE, or when FILE is -, read standard input.
Mandatory arguments to long options are mandatory for short options
too.
-c, --bytes=K
output the last K bytes; alternatively, use -c +K to output
bytes starting with the Kth of each file
-f, --follow[={name|descriptor}]
output appended data as the file grows; -f, --follow, and --fol-
low=descriptor are equivalent
-F same as --follow=name --retry
-n, --lines=K
output the last K lines, instead of the last 10; or use -n +K to
output lines starting with the Kth
--max-unchanged-stats=N
with --follow=name, reopen a FILE which has not changed size
after N (default 5) iterations to see if it has been unlinked or
renamed (this is the usual case of rotated log files). With
inotify, this option is rarely useful.
--pid=PID
with -f, terminate after process ID, PID dies
-q, --quiet, --silent
never output headers giving file names
--retry
keep trying to open a file even when it is or becomes inaccessi-
ble; useful when following by name, i.e., with --follow=name
-s, --sleep-interval=N
with -f, sleep for approximately N seconds (default 1.0) between
iterations.
With inotify and --pid=P, check process P at least once every N
seconds.
-v, --verbose
always output headers giving file names
--help display this help and exit
--version
output version information and exit
If the first character of K (the number of bytes or lines) is a ‘+’,
print beginning with the Kth item from the start of each file, other-
wise, print the last K items in the file. K may have a multiplier
suffix: b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024, GB
1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y.
With --follow (-f), tail defaults to following the file descriptor,
which means that even if a tail’ed file is renamed, tail will continue
to track its end. This default behavior is not desirable when you
really want to track the actual name of the file, not the file descrip-
tor (e.g., log rotation). Use --follow=name in that case. That causes
tail to track the named file in a way that accommodates renaming,
removal and creation.
AUTHOR
Written by Paul Rubin, David MacKenzie, Ian Lance Taylor, and Jim Mey-
ering.
REPORTING BUGS
Report tail bugs to bug-coreutils@gnu.org
GNU coreutils home page:
Copyright(C) linux-cmd.com All Rights Reserved. Author Takayuki Yukawa