head Command Generator
Generate head commands to output the first part of files
Getting Started with head
## What is head?
The `head` command outputs the first part of a file. By default it prints the first 10 lines. Use `-n` to change how many lines are shown.
## How to Use
1. **Set Options** (optional): Enter the number of lines to display in the Lines field. 2. **Specify File**: Enter the file to read. 3. **Copy & Run**: Copy the generated command into your terminal.
Common Options
### `-n` Number of lines Print the first N lines instead of the default 10. Leave the field empty (0) to use the default.
Leave the Lines field as 0 to omit the flag and use `head`'s built-in default of 10 lines.
▶How do I show the first 20 lines?
Use `head -n 20 log.txt`. Enter `20` in the Lines field and the file in the File field.
▶How do I show the first N bytes instead of lines?
Use `head -c 100 file.txt` to show the first 100 bytes. This generator does not include `-c`; add it manually.
If this tool has been helpful to you, consider buying me a coffee.
Buy me a coffee