Which command would you use to apply a diff file to an original?



A.

patch > diff-file

B.

patch < diff-file

C.

patch << diff-file

D.

cat diff-file >> kernel

E.

cat diff-file << kernel

題解

「patch」指令常與「diff」指令搭配使用來算出兩個檔案前後版本的差異,並且利用差異內容來進行版本的轉跳。

「patch」指令的用法如下:

patch < patch(diff)檔案

常會搭配「-p」參數來控制相對路徑的層級。

所以答案是選項B。