NAME
patch – apply patches |
SYNOPSIS
patch [ –R ] [ –p nstrip ] [ patch ... ] |
DESCRIPTION
Patch scans its input for a sequence of patches, and applies them,
printing the list of changed files. When an applied patch does
not match precisely, patch will scan the input file for matching
context, applying the patch up to 250 lines away from its original
location. If a hunk does not apply, then the file is left
untouched.
The following options are supported:
|
INPUT FORMAT
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: –––
If the old file is /dev/null, the patch indicates a file creation.
If the new file is /dev/null, the patch indicates a file deletion.
In this case, the file printed is the file being removed. |
SEE ALSO
diff(1), git/export(1) |
BUGS
The output of diff –c is not handled. Reject files and backups are not supported.
All files are processed in memory, limiting the maximum file size
to available RAM. |