Scroll to navigation

HEAD(1) 使用者命令 HEAD(1)

名稱

head - 輸出檔案的起始部分

概述

head [選項]... [檔案]...

描述

將檔案列表中每個檔案的起始10行內容輸出至標準輸出。如果指定多個檔案,則會在每個檔案的部分之前新增給定檔名稱。

如果沒有指定檔案,或者指定檔案為“-”,則從標準輸入讀取。

必選引數對長短選項同時適用。

顯示每個檔案的前 NUM 個位元組;以 '-' 起始,則顯示每個檔案中不包含最後 NUM 個位元組的全部內容
顯示前 NUM 行而不是前10行;以 '-' 起始,則顯示每個檔案中不包含最後 NUM 行的全部內容
不顯示給出檔名的首部
顯示給出檔名的首部
以 NUL 作為行的分隔符,而非換行符
顯示此幫助資訊並退出
顯示版本資訊並退出

NUM 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. Binary prefixes can be used, too: KiB=K, MiB=M, and so on.

作者

由 David MacKenzie 和 Jim Meyering 編寫。

報告錯誤

GNU coreutils 的線上幫助: <https://www.gnu.org/software/coreutils/>
GNU coreutils 的線上幫助: <https://www.gnu.org/software/coreutils/>

版權

Copyright © 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

參見

tail(1)

完整文件請見: <https://www.gnu.org/software/coreutils/head>
或者在本地使用: info '(coreutils) head invocation'

本頁面中文版由中文 man 手冊頁計劃提供。
中文 man 手冊頁計劃:https://github.com/man-pages-zh/manpages-zh

2020年三月 GNU coreutils 8.32