head: fix errors and improve descriptions (#18967)

Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
This commit is contained in:
DNEGEL3125
2025-10-27 02:03:17 +08:00
committed by GitHub
parent b336899e97
commit b3cdcf51a2
+8 -8
View File
@@ -3,18 +3,18 @@
> 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:
- Output the first 10 lines of a file:
`head {{[-n|--lines]}} {{8}} {{path/to/file}}`
`head {{path/to/file}}`
- Output the first few bytes of a file:
- Output the first 5 lines of multiple files:
`head {{[-c|--bytes]}} {{8}} {{path/to/file}}`
`head {{[-5|--lines 5]}} {{path/to/file1 path/to/file2 ...}}`
- Output everything but the last few lines of a file:
- Output the first `count` lines of a file:
`head {{[-n|--lines]}} -{{8}} {{path/to/file}}`
`head {{[-n|--lines]}} {{count}} {{path/to/file}}`
- Output everything but the last few bytes of a file:
- Output the first n `bytes` of a file:
`head {{[-c|--bytes]}} -{{8}} {{path/to/file}}`
`head {{[-c|--bytes]}} {{bytes}} {{path/to/file}}`