AcademyTerminal Tactics: Survival in the ShellPhase 7: Data Stream (Piping)

Lesson 8: The Data Pipeline (Redirection & Pipes)

In Linux, you can treat data like water in a pipe. You can catch it, save it in a bucket (file), or send it to another tool.

1. The Bucket (>)

The > symbol takes the output of a command and saves it into a file. Warning: It overwrites the file!

2. The Add-on (>>)

The >> symbol appends the output to the end of a file without deleting what's already there.

3. The Pipe (|)

The | symbol takes the output of the left command and sends it as input to the right command.

booting...

Mission Objective

  1. Save the current date to today.txt using >.
  2. Add your current username to the next line of today.txt using >>.
  3. Verify the contents using cat today.txt.

Mission Control

Save the current date to a file

Expected Command

date > today.txt

Append your username to the same file

Count how many files are in /etc