
head (ヘッド)はUNIXおよびUNIX系のシステムでテキストファイルやパイプ上のデータの冒頭から数行を表示するプログラムである。 head (head) is a UNIX and UNIX is a program that displays a few lines from the beginning of the data on the pipe or text-like systems. コマンドの文法は以下の通り。 The syntax of the command is as follows.
head [options] <file_name> head [options] <file_name> デフォルトでは、 headは入力の先頭10行を標準出力に表示する。 By default, head entered the top 10 to appear in the output line standard. 表示すべき行数はコマンド行オプションで変更できる。 Number of rows to be displayed can be changed by command line options. 以下の例ではfilenameの先頭20行を表示する。 The following examples show the filename first 20 rows.
head -n 20 filename head-n 20 filename
次は、名前がfoo*で始まる全てのファイルの先頭5行を表示する。 The following is the name of the file foo * All the top five to see a line beginning with.
head -n 5 foo* head-n 5 foo *
| ||||||||||||||||||||||||||
