» Linux » Examen sur Linux » Examen 201 : Advanced Administration » Section 5 » Question 19/23
19.You want to compile a kernel with an experimental change that is distributed in "patch" format. However, you want to make sure that the patch works correctly before changing the original kernel source code. How can you test the patch before actually applying it?

patch -p1
patch --context
patch --unified
patch --dry-run

Explanation: The patch -dry-run command is used to test a patch before applying it. This will produce a text output listing all the files that would be patched. If there are no 'Failed' messages, then the patch is safe to install.

Reference: http://www.hmug.org/man/1/patch.html

Incorrect Answers
A: Patch -p1 will apply the patch.
B: Patch --context will apply the patch as a 'context diff' file.
C: Patch --unified will apply the patch as a 'unified diff' file.

« Question 18 Question 20 »