Creating patches with diff: Difference between revisions
From charlesreid1
(Created page with "=References= * 10-min guide to diff patch: http://jungels.net/articles/diff-patch-ten-minutes.html") |
|||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
=Creating the Patch= | |||
==Directories== | |||
<source lang="bash"> | |||
$ diff -rupN dir1/ dir2/ > my_patch_file.patch | |||
</source> | |||
==Files== | |||
<source lang="bash"> | |||
$ diff -u file1 file2 > my_patch_file.patch | |||
</source> | |||
=Applying the Patch= | |||
You may need to use the -p flag when invoking patch, which strips various levels of directories from the patch file's list of files to patch. | |||
=References= | =References= | ||
* 10-min guide to diff patch: http://jungels.net/articles/diff-patch-ten-minutes.html | * 10-min guide to diff patch: http://jungels.net/articles/diff-patch-ten-minutes.html | ||
{{Programs}} | |||
{{Unix Programs}} | |||
Latest revision as of 17:09, 30 May 2012
Creating the Patch
Directories
$ diff -rupN dir1/ dir2/ > my_patch_file.patch
Files
$ diff -u file1 file2 > my_patch_file.patch
Applying the Patch
You may need to use the -p flag when invoking patch, which strips various levels of directories from the patch file's list of files to patch.
References
- 10-min guide to diff patch: http://jungels.net/articles/diff-patch-ten-minutes.html
| GNU/Linux/Unix the concrete that makes the foundations of the internet.
Compiling Software · Upgrading Software Category:Build Tools · Make · Cmake · Gdb Bash Bash · Bash/Quick (Quick Reference) · Bash Math Text Editors Text Manipulation Command Line Utilities Aptitude · Diff · Make · Patch · Subversion · Xargs Security SSH (Secure Shell) · Gpg (Gnu Privacy Guard) · Category:Security Networking Linux/SSH · Linux/Networking · Linux/File Server Web Servers
|