PATCH(1)PATCH(1)
NAME
patch – apply patches
SYNOPSIS
DESCRIPTION
When multiple patch files are provided, they are applied in order, interrupting the process in case of error. Successfully applied patches are not rolled back.
The following options are supported:
Interpret paths in the patch file relative to
Reverse direction of the patch. Additions become removals, and the new and old file names are swapped.
Print the files that would be modified by this patch, but do not apply it.
Remove the prefix containing
Apply as much of the patch as possible, saving any hunks that could not be applied to a rejection file.
INPUT
A patch begins with a patch header, and is followed by a sequence of one or more hunks. All lines before a patch header or after the last hunk of a patch are comments, and are ignored by patch. A patch header is a sequence of 2 lines in the following format:
--- oldfile [trailing text] +++ newfile [trailing text]
A hunk must immediately follow a patch header or another hunk. It begins with a header line in the following format:
@@ -count,addr +count,addr @@
And contains a sequence of lines beginning with a
If the old file is
SEE
BUGS
The output of
Reject files and backups are not supported.
All files are processed in memory, limiting the maximum file size to available RAM.