➜ ~ tldr head
head
Output the first part of files.
- Output the first few lines of a file:
head -n count_of_lines filename
- Output the first few bytes of a file:
head -c size_in_bytes filename
- Output everything but the last few lines of a file:
head -n -count_of_lines filename
- Output everything but the last few bytes of a file:
head -c -size_in_bytes filename
4p6cICB+IHRsZHIgaGVhZApoZWFkCgpPdXRwdXQgdGhlIGZpcnN0IHBhcnQgb2YgZmlsZXMuCgotIE91dHB1dCB0aGUgZmlyc3QgZmV3IGxpbmVzIG9mIGEgZmlsZToKCmhlYWQgLW4gY291bnRfb2ZfbGluZXMgZmlsZW5hbWUKCi0gT3V0cHV0IHRoZSBmaXJzdCBmZXcgYnl0ZXMgb2YgYSBmaWxlOgoKaGVhZCAtYyBzaXplX2luX2J5dGVzIGZpbGVuYW1lCgotIE91dHB1dCBldmVyeXRoaW5nIGJ1dCB0aGUgbGFzdCBmZXcgbGluZXMgb2YgYSBmaWxlOgoKaGVhZCAtbiAtY291bnRfb2ZfbGluZXMgZmlsZW5hbWUKCi0gT3V0cHV0IGV2ZXJ5dGhpbmcgYnV0IHRoZSBsYXN0IGZldyBieXRlcyBvZiBhIGZpbGU6CgpoZWFkIC1jIC1zaXplX2luX2J5dGVzIGZpbGVuYW1lCg==