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]#
2023-09-27 10:14:28
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]#