differ 用法



[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


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值