Terminal Dojo
Help العربية Sign inGet started

Command library / cat

cat

BashDraft — pending expert review3 practice missions

Print a file's contents to the screen

Reads a file (or several, concatenated) and writes it straight to standard output — the fastest way to see what's inside a small file. -n numbers every line, useful when someone points you at 'line 42'.

Practice cat

Usage

cat [-n] file...

Options and flags

Examples

Common mistakes

cat cat /etc/hostname

cat always needs at least one file to read — without one it just waits, reading from your keyboard instead.

Related commands

grepfind