patch

Create a patch file

How to create your own patch files.

Creating a patch
For a directory of files:

diff -Naur olddir newdir > new-patch

or for a single file:

diff -Naur oldfile newfile >new-patch

Applying a patch

patch -p0 < /path/to/new-patch
patch -p1 < /path/to/new-patch

Which one of the above patch commands you use depends on your current working directory.
The -p option will optionally strip off directory levels from the patchfile. For Ex: if you have a patchfile with a header as such:

Technology:

Subscribe to RSS - patch

Recent Updates

  • 8 months 3 weeks ago
    1.27.2 update
  • 9 months 3 days ago
    Drupal 10/11 config
  • 9 months 5 days ago
  • PHP
    9 months 5 days ago
    PHP 8.3.11 and AlmaLinux
  • 9 months 5 days ago
    New version of Pound