What does the -p3 option to the patch command do?

A. It will strip off path information from each file mentioned in the patch file up to and including the third / character.
B. patch continues execution as long as there are three or fewer errors.
C. It instructs patch to look up to three lines of context before or after the declared line in the original file for a match.
D. patch will keep three previous versions of each file in the output to prevent loss of change history.
E. It instructs patch to conform more strictly to the POSIX standard.

题解

「patch」指令常与「diff」指令搭配使用来算出两个文件前后版本的差异,并且利用差异内容来进行版本的转跳。

「patch」指令的用法如下:

patch < patch(diff)文件

常会搭配「-p」参数来控制相对路径的层级。

「-p3」参数即为第三层的相对路径,所以答案是选项「A」。