2025-03-14 21:59:59 -06:00
|
|
|
# head
|
|
|
|
|
|
|
|
|
|
> Output the first part of files.
|
|
|
|
|
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/head-invocation.html>.
|
|
|
|
|
|
|
|
|
|
- Output the first few lines of a file:
|
|
|
|
|
|
2025-03-19 19:23:44 -06:00
|
|
|
`head {{[-n|--lines]}} {{count}} {{path/to/file}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Output the first few bytes of a file:
|
|
|
|
|
|
2025-03-19 19:23:44 -06:00
|
|
|
`head {{[-c|--bytes]}} {{count}} {{path/to/file}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Output everything but the last few lines of a file:
|
|
|
|
|
|
2025-03-19 19:23:44 -06:00
|
|
|
`head {{[-n|--lines]}} -{{count}} {{path/to/file}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Output everything but the last few bytes of a file:
|
|
|
|
|
|
2025-03-19 19:23:44 -06:00
|
|
|
`head {{[-c|--bytes]}} -{{count}} {{path/to/file}}`
|