mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-07 10:45:37 +00:00
26 lines
572 B
Plaintext
26 lines
572 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, osx]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# head
|
|
|
|
> Output the first part of files.
|
|
> More information: <https://keith.github.io/xcode-man-pages/head.1.html>.
|
|
|
|
- Output the first 10 lines of a file:
|
|
|
|
`head {{path/to/file}}`
|
|
|
|
- Output the first 5 lines of multiple files:
|
|
|
|
`head {{[-5|--lines 5]}} {{path/to/file1 path/to/file2 ...}}`
|
|
|
|
- Output the first `count` lines of a file:
|
|
|
|
`head {{[-n|--lines]}} {{count}} {{path/to/file}}`
|
|
|
|
- Output the first n `bytes` of a file:
|
|
|
|
`head {{[-c|--bytes]}} {{bytes}} {{path/to/file}}`
|