syntax is patch [options] [Originalfile] [Patchfile]
For example:
Patch-p[num] <patchfile
The-p parameter determines whether to use the prefix directory information of the read out source filename, does not provide the-p parameter, ignores all directory information,-p0 (or-P 0) indicates that all path information is used,-P1 ignores the first "/" previous directory, and so on. A file name such as/usr/src/linux-2.4.16/makefile will use Linux-2.4.16/makefile as the file to patch when providing-P3 parameters.
For the example of the Linux kernel source 2.4.16 upgrade package Just given, assume that the source directory is in/usr/src/linux, then use "Patch-p0 <patch-2.4.16" to work when the current directory is/USR/SRC, in the current directory Usr/src/linux, "Patch-p1 <patch-2.4.16" can also work properly.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.