Section: Viewing Files

Show first 20 lines

bash
bash
head -20 app.log

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Viewing Files
Print file content
Output a file to standard output.
OpenIn sheetbashsame section
Open file with pager
Scroll through a file interactively.
OpenIn sheetbashsame section
Follow appended log lines
Watch file growth in real time.
OpenIn sheetbashsame section
Show unified diff
Compare two files in patch-friendly format.
Split file into chunks
Split a large file into 100 MB parts.