1. Linux diff命令介绍
diff命令会比较2个文本的差异然后显示出来。-u将显示一个合并格式的差异。
$ diff -u pop foo
--- pop 2019-12-21 20:01:05.000000000 +0800
+++ foo 2019-12-21 20:01:58.000000000 +0800
@@ -1,4 +1,4 @@
Apache Spark achieves high
-performance for both batch and streaming data,
-using a state-of-the-art DAG scheduler
+for both batch and streaming data,
+a query optimizer,
and a physical execution engine.
$ diff -r -u ./../public_html/ ./../my_website/
diff -r 命令会通过路径名遍历每个目录的文件,并总结每对文件的差异。
20200512,预答辩的前一天,追求自己力所能及的最好就好。不要浪费时间去想结果。今天的抑郁,来自往日的放任自流。能否吸取教训,可能更加重要。记住今天的失败吧。
本节命令总结
Linux:
1.diff -u file1 file2
2.diff -r -u directory1 directory2
网友评论