使用diff命令即可
diff path1 path2
实例如下:
[root@mpf202 mao]# mkdir /mao1
[root@mpf202 mao]# mkdir /mao2
[root@mpf202 mao]# diff /mao1 /mao2
[root@mpf202 mao]# touch /mao1/test
[root@mpf202 mao]# diff /mao1 /mao2
Only in /mao1: test
[root@mpf202 mao]#
使用diff命令即可
diff path1 path2
实例如下:
[root@mpf202 mao]# mkdir /mao1
[root@mpf202 mao]# mkdir /mao2
[root@mpf202 mao]# diff /mao1 /mao2
[root@mpf202 mao]# touch /mao1/test
[root@mpf202 mao]# diff /mao1 /mao2
Only in /mao1: test
[root@mpf202 mao]#