使用法: head [オプション]... [ファイル]...
Print the first 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.
長いオプションに必須の引数は短いオプションにも必須です.
-c, --bytes=[-]K print the first K bytes of each file;
with the leading `-', print all but the last
K bytes of each file
-n, --lines=[-]K print the first K lines instead of the first 10;
with the leading `-', print all but the last
K lines of each file
-q, --quiet, --silent ファイルごとのヘッダの出力を行わない
-v, --verbose ファイルごとにヘッダを出力
--help この使い方を表示して終了
--version バージョン情報を表示して終了
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.
Report head bugs to bug-coreutils@gnu.org
GNU coreutils home page:
Usage: head [OPTION]... [FILE]...
Print the first 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 print the first K bytes of each file;
with the leading `-', print all but the last
K bytes of each file
-n, --lines=[-]K print the first K lines instead of the first 10;
with the leading `-', print all but the last
K lines of each file
-q, --quiet, --silent never print headers giving file names
-v, --verbose always print headers giving file names
--help display this help and exit
--version output version information and exit
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.
Report head bugs to bug-coreutils@gnu.org
GNU coreutils home page:
HEAD(1) HEAD(1)
名前
head - ファイルの最初の部分を表示する
書式
head [-LINES] [-qv] [-c BYTES] [-n LINES] [--bytes=BYTES]
[--lines=LINES] [--quiet] [--silent] [--verbose] [FILE...]
head [--help] [--version]
説明
head は引数に指定された FILE の最初の部分 (デフォルトは 10 行) を表示す
る。 FILE が 1 つも与えられないと標準入力から読み込む。また FILE が ‘-’
だった場合には、そのファイルには標準入力が用いられる。
複数の FILE が指定されたときは, head はそれぞれの前に、以下の内容の 1
行のヘッダを各ファイルの前に出力する:
==> FILENAME <==
head は 2 つのオプション形式を受付ける。新しい形式は、数値をオプション
の引数として与える (‘-q -n 1’) ものであり、古い形式はオプション文字の前
に数値を指定する (‘-1q’) ものである。
オプション
-LINES こ のオプションは最初に指定されたときに限って認識される。 LINES
は 10 進数の数値。単位を表す文字 (‘b’, ‘k’, ‘m’) を後置したり (
そ れぞれの意味は ‘-c’ のものと同じ)、行単位のカウントを指定する
‘l’ を後置したり、他のオプション文字 (‘cqv’) を後置したりでき る
。 何も文字が後置されなかった場合は ‘l’ が指定されたのと同じこと
になる。このオプションは推奨されない。代わりに --lines を使う こ
と。
-c BYTES, --bytes=BYTES
行単位ではなく、先頭の BYTES バイトを表示する。 ‘b’ を追加すると
BYTES の 512 倍、 ‘k’ は 1024 倍、 ‘m’ は 1048576 倍を指定したこ
とになる。
-n LINES, --lines=LINES
最初の LINES 行を表示する。
-q, --quiet, --silent
ファイル名のヘッダを出力しない。
-v, --verbose
常にファイル名のヘッダを出力する。
--help 標準出力に使用方法のメッセージを出力して正常終了する。
--version
標準出力にバージョン情報を出力して正常終了する。
注意
プログラムのバグについては bug-textutils@gnu.org に報告してください。
man ページは Ragnar Hojland Espinosa
HEAD(1) User Commands HEAD(1)
NAME
head - output the first part of files
SYNOPSIS
head [OPTION]... [FILE]...
DESCRIPTION
Print the first 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
print the first K bytes of each file; with the leading ‘-’,
print all but the last K bytes of each file
-n, --lines=[-]K
print the first K lines instead of the first 10; with the lead-
ing ‘-’, print all but the last K lines of each file
-q, --quiet, --silent
never print headers giving file names
-v, --verbose
always print headers giving file names
--help display this help and exit
--version
output version information and exit
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.
AUTHOR
Written by David MacKenzie and Jim Meyering.
REPORTING BUGS
Report head bugs to bug-coreutils@gnu.org
GNU coreutils home page:
Copyright(C) linux-cmd.com All Rights Reserved. Author Takayuki Yukawa