Diffing entire directories
Missions: Using diff and patch

Diffing entire directoriesDiffing entire directoriesWith pancake success under your belt, your publisher invited you to write a new book: Things to eat with oven pancakes. This second book was a smash-hit in England! Your publisher has asked you to prepare an edition for the United States of America. Wise yet shrewd, you realize that the only change you’d need to make to your cookbook would be to Here is your mission:
Since this is a larger patch, you will be uploading it as a file rather than just pasting it in. (Also, if you’re in the mood for some cooking after you complete the mission, we’d love to know how one of those recipes turns out. But that’s not part of the mission.) Context in open sourceWhen contributing changes to a project, often your changes If you need help with this step, try clicking through these hints. The “low” hint level is perfect if you’re just confused as to what to do. The “high” level is great if you are unfamiliar with the commands and tools you’d use. Read the man page for diff online, or, if you’re on Linux or Mac, use the terminal command: man diff In this mission, you have to do a few things. Tips:
Open a command prompt, and type these commands in, one at a time. You need to copy them exactly. Make sure to press enter between each one. First, create a directory you’ll work in and change into it. mkdir recursivediff cd recursivediff Then, download the original collection of recipes. curl -0 https://www.vedova.org/download/training/missions/diffpatch/diffrecursive/recipes.tar.gz Unzip the archive file, but do not extract it. gzip -d recipes.tar.gz Unpack it once, and rename that to recipes-us indicating that this is the version you’ll adjust for American tastes. (This is the copy we’ll edit.) tar -xvf recipes.tar mv recipes recipes-us Unpack it again, keeping this one with the original name. (We’ll need this original so that diff can detect the differences.) tar -xvf recipes.tar Look for the new recipes-us directory on your computer, and open up each of the files inside ending in .txt. Change “aubergine” to “eggplant”, and change “Aubergine” to “Eggplant” (capitalization matters!). Go back to the terminal and run this command. diff -ur recipes recipes-us > adjust-for-americans.patch |