Skip to content

Saving output to files

Catching the output

  • Normally a command's output appears on screen. The > symbol redirects it into a file instead:
echo hello > greeting.txt
  • Nothing prints — the text went into greeting.txt. Read it back with cat greeting.txt.

The > symbol sends a command's output into a file instead of the screen

Log in or create account

IGCSE & A-Level