Linux Commands Reference - Complete Linux Command Guide

Comprehensive Linux command reference with 150+ commands. Search, filter by category, and view detailed usage examples.

Share
Back to commands

head

Output first part of files

Syntax

head [OPTION]... [FILE]...

Common Options

-nShow first N lines
-cShow first N bytes
-qQuiet mode

Common Examples

head file.txt

Show first 10 lines

head -n 20 file.txt

Show first 20 lines

head -c 100 file.txt

Show first 100 bytes

Related Commands

Related Tools

More Code & Dev Tools