~/tutorials/011-your-account.md
011: Your account, and the one file that writes
Everything in this tree is read-only. Exactly one path writes, it is yours, and this lesson is about it.
Where you are, and who
whoami
Signed out, it says visitor (for now). Signed in, it says your handle. That is the shell and the page agreeing about one fact, and it is worth checking which state you are in before you ask anything else.
The file
ls -a ~/Account
cat Account/.flags
ls -a is required, because .flags begins with a dot and ls keeps those to itself. Signed in, the listing shows the file and marks it yours. Signed out, both commands explain instead of executing, and nothing records.
The file holds the flags you have found, one per line, in the order you found them. A miss answers no. and nothing else: no near, no count, no hint at how many exist.
Recording a find
submit flag{something}
submit checks the string, records it if it is real, and says already yours. if you had it. echo with >> does the same thing, because the natural spelling and the official one should both work. > is refused, and the refusal is the reason: overwriting a ledger is a claim that nothing happened.
Counting what you have
cat Account/.flags | wc -l
The file is a record of what happened, and wc -l is how you count a record. wc -l counts lines, and every find is one line.
Try it
Each of these has one answer the shell gives you. Check yourself.
- Are you signed in? One command knows.
- Read your own file. How many finds is that?
- Submit a string that is not a flag, and read the answer carefully. What did it not tell you?
- Try to write somewhere that is not your file. Read the refusal, because the refusal is the design.
Wait
If you found a real flag in an earlier lesson and have not recorded it, this is the room where that gets done.