2023-02-03 05:24:27 +01:00
|
|
|
# head
|
|
|
|
|
|
|
|
> Output the first part of files.
|
|
|
|
> More information: <https://keith.github.io/xcode-man-pages/head.1.html>.
|
|
|
|
|
|
|
|
- Output the first few lines of a file:
|
|
|
|
|
2025-03-26 02:30:50 +02:00
|
|
|
`head {{[-n|--lines]}} {{8}} {{path/to/file}}`
|
2023-02-03 05:24:27 +01:00
|
|
|
|
|
|
|
- Output the first few bytes of a file:
|
|
|
|
|
2025-03-26 02:30:50 +02:00
|
|
|
`head {{[-c|--bytes]}} {{8}} {{path/to/file}}`
|
2023-02-03 05:24:27 +01:00
|
|
|
|
|
|
|
- Output everything but the last few lines of a file:
|
|
|
|
|
2025-03-26 02:30:50 +02:00
|
|
|
`head {{[-n|--lines]}} -{{8}} {{path/to/file}}`
|
2023-02-03 05:24:27 +01:00
|
|
|
|
|
|
|
- Output everything but the last few bytes of a file:
|
|
|
|
|
2025-03-26 02:30:50 +02:00
|
|
|
`head {{[-c|--bytes]}} -{{8}} {{path/to/file}}`
|