Skip to content

head(LPIC)

   

head

テキストファイルの先頭部分を表示するコマンドです。 デフォルトでは10行目まで表示します。

オプション

-n

行数を数字で指定する。

サンプル

pokemons.txtの先頭を表示

$ head pokemons.txt

pokemons.txtの先頭3行を表示

$ head -3 pokemons.txt

関連記事

  1. grep(LPIC)
  2. コマンドを続けて実行する(LPIC)
  3. tee(LPIC)
  4. リダイレクト(LPIC)
  5. cat(LPIC)
  6. less(LPIC)
  7. more(LPIC)