Advent of terminal

I always wanted to teach my son how to use terminal. I believe terminals show how incredibly powerful and automatable our computers can be. I came up with this idea similar to the Advent of Code, and also inspired by CtF competitions where you are looking for a clue in a system.

Every day, I give my son a terminal window opened in a folder that has a puzzle. He has to find an answer. I give minumal number of instructions and only rarely help him with ideas, he has to google stuff himself. You can find the puzzles below.

Day 1

You start in a directory that has answer.txt. You have to learn ls/cat to find and read the solution.

Day 2

You start in a directory that has left and right directories. Those directories also have two directories each. After a several layers, one of the leaf directories has answer.txt. You have to practice your cd skills to find the clue. You can also do find or tree, but this is a bit more involved.

Day 3

answer.txt has more than 1000 lines in it. The first line says: "The answer to this challenge is the number of lines in this file". You need to use wc -l to get it.

Day 4

You start in a directory that has answer.txt, but this file was chmodded with 000 mask. You will have to learn how to add read rights to the file to get the clue.

Day 5

answer.txt has more than 1000 lines in it. The first line says: "The answer to this puzzle is this file size in kilobytes.". You need to learn ls flags for this.

Day 6

The starting directory has five files of different size: 1, 2, 3, 4, 5. File 1 says that the answer to this puzzle is a 5 digit number that you get if you sort the files by their filesize from smallest to largest.

Day 7

The starting directory has two files in it. The first line says: "The answer to this challenge is a number which is present in one file, but not in another. You need to compare the two somehow. Difference is key!" The rest of the file is 999 numbers in one file, and 998 numbers in another.

Day 8

answer.txt says: "The answer to this challenge is the number of lines in the source code of my website: https://yobibyte.github.io/. You might find wget command useful for that.

Day 9

This is an important day. You have to open answer.txt in vim and quit it to finish the challenge. If you opened vim, but cannot quit it, it does not count. Good luck!

Day 10

This time, answer.txt has more than a thousand lines in it. The first line says: "You can find the answer by looking through this file. But you have to be smart about it. Have you heard of grep?". One of the lines says: "the answer to this puzzle is ..."

Day 11

The starting directory has answer.tar.gz. The archive has answer.txt in it. You need to learn how to unarchive it to get the clue.

Day 12

Day 13

Day 14

Day 15

Day 16

Day 17

Day 18

Day 19

Day 20

Day 21

Day 22

Day 23

Day 24

Day 25

That's all, hope your kid enjoyed it!