If the current directory is /root and the kernel source is located in /usr/src/linux, which of the
following commands should be used to apply the patch /tmp/foopatch?
A.
cd /usr/src/linux; cat /tmp/foopatch | patch
B.
cd /usr/src/linux; cat /tmp/foopatch | patch -p0
C.
cd /usr/src/linux; patch -p1 > /tmp/foopatch
D.
cd /usr/src/linux; patch -p1 < /tmp/foopatch
E.
cat /tmp/foopatch | patch -p0
Explanation:
patch takes a patch file patchfile containing a difference listing produced by the diff program and
applies those differences to one or more original files, producing patched versions. Normally the
patched versions are put in place of the originals.
Answer D is correct because first changes the directory and running patch command by taking
input from the /tmp/foopatch.
; STOP COMMAND
<–X APPLY FROM THE TEMP LOC
0
0