> For the complete documentation index, see [llms.txt](https://www.shellspells.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.shellspells.net/linux/file-ops/read-content.md).

# Read Content

<table><thead><tr><th width="304">Command</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:yellow;"><code>cat [file]</code></mark></td><td>Display all</td></tr><tr><td><mark style="color:yellow;"><code>less [file]</code></mark></td><td>Paging with search</td></tr><tr><td><mark style="color:yellow;"><code>more [file]</code></mark></td><td>Paging</td></tr><tr><td><mark style="color:yellow;"><code>head [file]</code></mark></td><td>First lines (default is 10 lines)</td></tr><tr><td><mark style="color:yellow;"><code>head -n 15 [file]</code></mark></td><td>First 15 lines.</td></tr><tr><td><mark style="color:yellow;"><code>tail [file]</code></mark></td><td>Last lines (default is 10 lines)</td></tr><tr><td><mark style="color:yellow;"><code>tail -n 15 [file]</code></mark></td><td>Last 15 lines.</td></tr><tr><td><mark style="color:yellow;"><code>tail -f [file]</code></mark></td><td>Continuously monitor for new lines, useful for logs.</td></tr><tr><td><mark style="color:yellow;"><code>nl [file]</code></mark></td><td>Display contents with line numbers</td></tr><tr><td><mark style="color:yellow;"><code>od -c [file]</code></mark></td><td>Display in octal along with ASCII characters.</td></tr><tr><td><mark style="color:yellow;"><code>hexdump -C [file]</code></mark></td><td>Display in hex. Useful for binaries.</td></tr><tr><td><mark style="color:yellow;"><code>strings [file]</code></mark></td><td>Extract and display printable strings.</td></tr><tr><td><mark style="color:yellow;"><code>zcat file.gz</code></mark></td><td>Display contents of gzipped files without decompressing it on disk.</td></tr><tr><td><mark style="color:yellow;"><code>zless file.gz</code></mark></td><td>View the contents of a gzipped [file] in an interactive <mark style="color:yellow;"><code>less</code></mark>-like interface.</td></tr><tr><td><mark style="color:yellow;"><code>zmore file.gz</code></mark></td><td>View the contents of a gzipped [file] page by page, similar to <mark style="color:yellow;"><code>more</code></mark>.</td></tr><tr><td><mark style="color:yellow;"><code>bzcat file.bz2</code></mark></td><td>Display the contents of a bzip2-compressed [file] without decompressing it on disk.</td></tr><tr><td><mark style="color:yellow;"><code>highlight --syntax [file]</code></mark></td><td>Applies syntax highlighting based on the file type.</td></tr></tbody></table>
