2023-02-03 05:24:27 +01:00
|
|
|
# head
|
|
|
|
|
|
|
|
> Output the first part of files.
|
2025-01-10 22:27:21 -08:00
|
|
|
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/head-invocation.html>.
|
2023-02-03 05:24:27 +01:00
|
|
|
|
|
|
|
- Output the first few lines of a file:
|
|
|
|
|
|
|
|
`head --lines {{count}} {{path/to/file}}`
|
|
|
|
|
|
|
|
- Output the first few bytes of a file:
|
|
|
|
|
|
|
|
`head --bytes {{count}} {{path/to/file}}`
|
|
|
|
|
|
|
|
- Output everything but the last few lines of a file:
|
|
|
|
|
|
|
|
`head --lines -{{count}} {{path/to/file}}`
|
|
|
|
|
|
|
|
- Output everything but the last few bytes of a file:
|
|
|
|
|
|
|
|
`head --bytes -{{count}} {{path/to/file}}`
|