AI engineering glossary · Command line Git

What is redirection?

Redirection: Sending a command's input or output to or from a file instead of the screen or keyboard. The > symbol writes, overwriting the file, >> appends and < reads. Number prefixes such as 2> select the error channel.

Level: intermediateTopic: Command line Git

Redirection: an example

ls > files.txt saves a directory listing; ls >> files.txt adds another listing to the end.

Related terms

More Command line Git terms

Where you learn it

Redirection is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.