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」。