O'Reilly logo

SAMS Teach Yourself Unix in 10 Minutes by Robert Shimonski

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The diff and patch Commands

The diff and patch commands are a pair so we will cover them here together. Because of how they work, we will cover diff first.

When using diff, you will take two files, the original template file and an updated file that produces an output file. This file will contain enough information within it to be able to reconstruct the updated file when only given the patch file and template file. This can be handy if you want to only send out updates to, for example, a book, as you could send the edits instead of sending the entire file and replacing it. For smaller files this may not be a big deal, but for larger files that are of substantial size, and may have multiple people working on them, using diff may be very helpful ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required