The specification for "patch" is as specified in the SUS but with the following differences as listed below.
Back up a file if the patch does not match the file exactly and if backups are not otherwise requested.
Do not back up a file if the patch does not match the file exactly and if backups are not otherwise requested.
prefix pref to a file name when generating its simple backup file name.
Read and write all files in binary mode, except for standard output and /dev/tty. This option has no effect on POSIX-compliant systems.
Print the results of applying the patches without actually changing any files.
Remove output files that are empty after the patches have been applied. When patch removes a file, it also attempts to remove any empty ancestor directories.
Skip patches whose headers do not say which file is to be patched; patch files even though they have the wrong version for the Prereq: line in the patch; and assume that patches are not reversed even if they look like they are.
Set the maximum fuzz factor. This option only applies to diffs that have context, and causes patch to ignore up to that many lines in looking for places to install a hunk.
This option controls patch's actions when a file is under RCS or SCCS control, and does not exist or is read-only and matches the default version. If num is positive, patch gets (or checks out) the file from the revision control system; if zero, patch ignores RCS and SCCS and does not get the file; and if negative, patch asks the user where to get the file.
Work silently, unless an error occurs.
Suppress questions like -f, but make some different assumptions: skip patches whose headers do not contain file names; skip patches for which the file has thewrong version for the Prereq: line in the patch; and assume that patches are reversed if they look like they are.
Set the modification and access times of patched files from time stamps given in context diff headers, assuming that the context diff headers use local time.
Interpret the patch file as a unified context diff.
Print out patch's revision header and patch level, and exit.
Use method to determine backup file names. The method can also be given by the PATCH_VERSION_CONTROL environment variable, which is overridden by this option.
Output extra information about the work being done.
Set internal debugging flags of interest only to patch patchers.
Prefix pref to the basename of a file name when generating its simple backup file name.
Use suffix as the simple backup suffix.
Set the modification and access times of patched files from time stamps given in context diff headers.
display this help and exit