Install the complete package with local command reference and every published mode.
install diffdiff-c 0 shows only changed lines. Save a reviewable unified patch with -o <patch>.
The .patched file. Use -o <dst> for another destination and -f only if that output already exists. -r explicitly replaces the input file.
A patch records surrounding text. Before writing, the command checks that this text still matches the source; a patch from another revision fails instead of blindly editing it. Both files must be readable text, at most 4 MiB and 20000 lines.
diff <old> <new> [options]diff <old> <new>show a unified text
diff <old> <new> -c <lines>set context from 0 to 20 lines
diff <old> <new> -qreport only whether the files differ
diff <old> <new> -o <patch>save the unified
patch <file> <patch>apply a unified patch into <file>.patched
patch <file> <patch> -o <dst>write the patched text to another file
patch <file> <patch> -ratomically replace the original file
patch <file> <patch> -fallow an existing non-replacing output file to be replaced
-c 0 shows only changed lines. Save a reviewable unified patch with -o <patch>.
The .patched file. Use -o <dst> for another destination and -f only if that output already exists. -r explicitly replaces the input file.
A patch records surrounding text. Before writing, the command checks that this text still matches the source; a patch from another revision fails instead of blindly editing it. Both files must be readable text, at most 4 MiB and 20000 lines.
Run the prepared examples directly on the page. Their results are prebuilt and shown in the browser; no terminal command is executed on the server.
Install the current compatible version. Choose Base for the complete feature set or Minimum for the reduced package; use upgrade to update a module that is already installed.
Base and Minimum are two packages of the same current module release, not separate command versions.
Install the complete package with local command reference and every published mode.
install diffInstall the reduced package. Local reference is omitted;
install diff -mInstall exactly this published version.
install diff -v 1.1.4Ask upgrade to check compatibility and replace the installed block only when needed.
upgrade diffRemove the extension block while leaving the core and unrelated modules intact.
install diff -uExamples are copyable command lines, not actions executed by this website. Review paths, permissions and destructive flags before running them on a real project.
cd \sandbox | diff workspace/original.txt workspace/updated.txt--- workspace/original.txt
+++ workspace/updated.txt
@@ -1,3 +1,4 @@
alpha
-beta
+beta updated
gamma
+deltadiff \sandbox\workspace\original.txt \sandbox\workspace\updated.txt -c 0--- workspace/original.txt
+++ workspace/updated.txt
@@ -2 +2 @@
-beta
+beta updated
@@ -3,0 +4 @@
+deltadiff \sandbox\workspace\original.txt \sandbox\workspace\updated.txt -qDifferentdiff \sandbox\workspace\original.txt \sandbox\workspace\updated.txt -o \sandbox\tmp\workspace.patchSaved tmp/workspace.patch
Size 110 Bpatch \sandbox\workspace\original.txt \sandbox\workspace\change.patchSource workspace/original.txt
Patched workspace/original.txt.patchedpatch \sandbox\workspace\original.txt \sandbox\workspace\change.patch -o \sandbox\tmp\patched.txtSource workspace/original.txt
Patched tmp/patched.txtpatch \sandbox\workspace\original.txt \sandbox\workspace\change.patch -o \sandbox\tmp\current.txt -fSource workspace/original.txt
Patched tmp/current.txtpatch \sandbox\workspace\original.txt \sandbox\workspace\change.patch -rSource workspace/original.txt
Patched workspace/original.txtpatch \sandbox\workspace\updated.txt \sandbox\workspace\change.patchPatch deletion mismatchdiff \sandbox\missing.txt \sandbox\workspace\updated.txtFile not founddiff \sandbox\workspace\original.txt \sandbox\workspace\updated.txt -q -o \sandbox\tmp\bad.patchChoose -q or -osandbox/workspace/original.txtThe example uses a file or directory from the protected /sandbox/ documentation workspace.
alpha
beta
gamma
Current stable release of