笔记文件 diff 和patch

diff 命令比较两个文件之间的区别
-u 选项来输出“统一的(unified)”diff格式文件,最适用于补丁文件
范例

root@centos7 data]# cat 1.txt
a
bb
ccc
dddd

[root@centos7 data]# cat 2.txt
1
22
333
4444
a
bb
ccc
[root@centos7 data]# diff 1.txt 2.txt
0a1,4
> 1
> 22
> 333
> 4444
4,5d7
< dddd
<
[root@centos7 data]#

posted @ 2022-02-27 11:21  是阿帅不是阿衰  阅读(50)  评论(0)    收藏  举报