Install the complete package with local command reference and every published mode.
install diffdiffTreat
A useful sequence is .patched file; -r is the explicit step that replaces the source.
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
.patched result by default; use -o <dst> for another destination. Replacing the original requires -r.
Each compared text file is limited to 4 MiB and 20000 lines, and binary input is rejected. A generated
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.3Ask 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,2 +1,2 @@
-alpha
+alpha revieweddiff workspace/original.txt workspace/updated.txt -c 1--- workspace/original.txt
+++ workspace/updated.txt
@@ -1,2 +1,2 @@
-alpha
+alpha revieweddiff workspace/original.txt workspace/updated.txt -qDifferent yes
Old workspace/original.txt
New workspace/updated.txtdiff workspace/original.txt workspace/updated.txt -o tmp/workspace.patchSaved tmp/workspace.patch
Size 148 Bpatch workspace/original.txt tmp/workspace.patchSource workspace/original.txt
Patched workspace/original.txt.patchedpatch workspace/original.txt tmp/workspace.patch -o tmp/patched.txtSource workspace/original.txt
Patched tmp/patched.txtpatch workspace/original.txt tmp/workspace.patch -o tmp/current.txt -fSource workspace/original.txt
Patched tmp/current.txt
Replace explicitpatch workspace/original.txt tmp/workspace.patch -rSource workspace/original.txt
Patched workspace/original.txtdiff missing.txt workspace/updated.txtFile not found: missing.txtsandbox/workspace/original.txtThe example uses a file or directory from the protected /sandbox/ documentation workspace.
alpha
beta
gamma
Current stable release of