Turn a build log into a tutorial
Reorders what you actually did into what someone should do.
I built something and took rough notes. Turn them into something someone else can follow. [PASTE NOTES] Reader: [WHO THIS IS FOR, AND WHAT THEY ALREADY KNOW] The hard part is that my notes are in the order I *discovered* things, not the order someone should *do* them. Reorder them. Produce: what this builds and what it requires, then numbered steps, each with the command or code and what success looks like. Then two sections my notes will not contain and readers need: - **Where people will get stuck** — the steps where I clearly went back and fixed something. - **What I would do differently**, from the evidence of the notes. Mark anything you inferred rather than read as **[VERIFY]**. Do not include a dead end unless understanding it prevents the reader hitting it.
Highlighted parts are placeholders. Replace them before you send.
Worked example
The input is invented for this page. The output shows what the prompt asks for with that input.
Example input (invented)
Notes
- first tried cp -r ~/Photos /mnt/backup every night. slow, copies everything every time
- tried a backup app from the software store before that, gave up, too many settings
- switched to rsync: rsync -a --delete ~/Photos /mnt/backup/Photos
- ended up with /mnt/backup/Photos/Photos. needs the trailing slash: ~/Photos/
- cron: crontab -e, added 0 2 * * * rsync -a --delete /home/ana/Photos/ /mnt/backup/Photos/
- cron did not seem to run, no output anywhere. added >> /home/ana/backup.log 2>&1
- log said "No such file or directory" for /mnt/backup/Photos
- after a reboot the drive mounts at /media/ana/BACKUP, not /mnt/backup
- fixed with fstab. got the UUID from lsblk -f. UUID=... /mnt/backup ext4 defaults 0 2
- sudo mkdir /mnt/backup first, then sudo mount -a, no errors
- works now, checked the next morning
Reader: Someone on a Linux desktop who can open a terminal and paste commands, but has never used cron or edited a system file.
Example output
What this builds. A copy of your Photos folder on an external drive, updated every night at 02:00, copying only what changed. You need a Linux computer that is on at 02:00 [VERIFY], a drive formatted as ext4 [VERIFY] and rsync. Replace ana with your username throughout.
Step 1. Find the drive's ID.
lsblk -f
It worked if your drive is listed with a long UUID. Copy it.
Step 2. Give the drive a fixed place. Create the folder, then open the system file that lists drives:
sudo mkdir /mnt/backup
sudo nano /etc/fstab
Add this line at the end, with your UUID, then save:
UUID=your-uuid-here /mnt/backup ext4 defaults,nofail 0 2
sudo mount -a
It worked if this prints nothing and ls /mnt/backup shows the drive's files. nofail lets the computer start normally when the drive is unplugged.
Step 3. Run the copy once by hand.
rsync -a --delete /home/ana/Photos/ /mnt/backup/Photos/
It worked if your photos sit directly in /mnt/backup/Photos. If it says "Permission denied", the drive's top folder belongs to root. Run sudo mkdir -p /mnt/backup/Photos and sudo chown ana: /mnt/backup/Photos, then try again. --delete also removes from the backup whatever you delete from Photos.
Step 4. Schedule it. Run crontab -e and add this line:
0 2 * * * rsync -a --delete /home/ana/Photos/ /mnt/backup/Photos/ >> /home/ana/backup.log 2>&1
It worked if, the next morning, yesterday's new photos are on the drive and ~/backup.log holds no errors. An empty log is a good sign.
Where people get stuck
- The slash after
Photos/. Without it you getPhotos/Photos. - The drive moving to another path after a reboot. Step 2 fixes that, which is why it comes before the schedule.
- A cron job that fails silently. The
>> backup.logpart is what makes the error visible.
What I would do differently
- Write the log from the first night.
- Put
nofailin the fstab line from the start. Without it, a boot with the drive unplugged can stall while the system waits for it.
More Technology & industry prompts
3 of the 7 other prompts filed under Technology & industry.
Turn a chat thread into a decision log
Turns a long Slack or Teams thread into a decision log with the reasoning behind each call. Reversed decisions show their final state.
Choose between two architectures
Compares on what you will actually feel, not on what sounds better.
Explain what a model can and cannot do
A capability read for a specific task, without the marketing.