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