Terminal Explorer — Terminal

Explore the command line: 10 levels of cd, ls, grep, pipes and xargs. The fastest Unix terminal game for getting fluent in the shell.

What you learn in this game

Welcome, Explorer. You'll explore a virtual filesystem using terminal commands. Each level is a mission: arrange the commands in the correct order to complete it.

mkdir creates a new directory. touch creates an empty file (or updates the timestamp if it exists). Both commands are basic to building a project structure.

grep (Global Regular Expression Print) searches for a text pattern inside files. The pattern can be written as a regex. grep -r "pattern" . = search recursively in all files.

A pipe (|) connects one command's output to the next command's input. This is the Unix philosophy: small programs that can be combined. cat file | grep pattern | sort | uniq = read → filter → sort → remove duplicates.

Frequently-used grep flags: -i (case-insensitive), -v (invert, lines that do NOT match), -r (recursive), -l (file names only), -n (line numbers), -c (count matches).

find searches for files by name/size/date. With -exec, you can run any command for each result. The placeholder {} is replaced with the file name, and \; marks the end of the command.

What the levels ask

  1. Arrange the commands to complete the mission.
  2. Move into the documents folder and list its contents.
  3. You're in /home/user/documents. Go back to /home/user.
  4. There's a secret file. Read what's inside.
  5. Create a new folder and file.
  6. Copy a file to another folder, then move it.
  7. Delete the right file, and don't get it wrong.
  8. Find files that contain a certain word.
  9. Combine two commands using a pipe.
  10. Combine all your skills: find, read, and save the important data.
  11. Search for the word "error" regardless of upper or lowercase.
  12. Search for "TODO" across the whole project folder, recursively.

And more, 20 levels in all.