这代表它找到的每个差异周围的“上下文行”的数量。
可能最好用一个例子来说明:
$ diff -U 1 hello.txt hello2.txt
--- hello.txt 2015-01-24 16:10:45.000000000 +0100
+++ hello2.txt 2015-01-24 16:11:14.000000000 +0100
@@ -4,3 +4,3 @@
Hello World.
-Hello World.
+Yo World.
Hello World.
$ diff -U 2 hello.txt hello2.txt
--- hello.txt 2015-01-24 16:10:45.000000000 +0100
+++ hello2.txt 2015-01-24 16:11:14.000000000 +0100
@@ -3,5 +3,5 @@
Hello World.
Hello World.
-Hello World.
+Yo World.
Hello World.
Hello World.
$ diff -U 3 hello.txt hello2.txt
--- hello.txt 2015-01-24 16:10:45.000000000 +0100
+++ hello2.txt 2015-01-24 16:11:14.000000000 +0100
@@ -2,7 +2,7 @@
Hello World.
Hello World.
Hello World.
-Hello World.
+Yo World.
Hello World.
Hello World.
Hello World.