CSx
Github Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

πŸ’» Patching C


For when someone says, “Patch your systems people!”

Create a patch

  • diff -u original/code.c modified/code.c > code.patch

Test Before Applying

  • patch --dry-run

Apply a patch

  • patch -u original/code.c modified/code.c -i codes.patch

Apply Patch and backup original

  • patch -u -b original/code.c modified/code.c -i code.patch

Create a patch of a directory

  • diff -ruN original/ modified/ > code.patch

Apply a patch of a directory

  • patch -ruN -d working < slang.patch