[liuqiang2@mu02 logs]$ diff -ur test1/ test3/
diff -ur test1/1.txt test3/1.txt
--- test1/1.txt 2015-02-03 20:52:01.087877007 +0800
+++ test3/1.txt 2015-02-03 20:52:26.761883769 +0800
@@ -1,2 +1 @@
-
-2232
+dfsdfsdf
Only in test3/: 344.txt
u表示unified格式,r表示在目录中嵌套使用,参数N表示如果某个文件仅在一个目录中出现,则假定其在另一个目录中为空文件;
[liuqiang2@mu02
logs]$ diff -Nur test1/ test3/
diff -Nur test1/1.txt test3/1.txt
--- test1/1.txt 2015-02-03 20:52:01.087877007 +0800
+++ test3/1.txt 2015-02-03 20:52:26.761883769 +0800
@@ -1,2 +1 @@
-
-2232
+dfsdfsdf
diff -Nur test1/344.txt test3/344.txt
--- test1/344.txt 1970-01-01 08:00:00.000000000 +0800
+++ test3/344.txt 2015-02-03 20:52:13.570879471 +0800
@@ -0,0 +1 @@
+587