리눅스 diff3

(Diff3에서 넘어옴)

1 개요[ | ]

diff3
/usr/bin/diff3
  • 파일 3개를 비교하는 리눅스 명령어
  • 세 파일의 차이를 보여줌

2 예시[ | ]

[root@zetawiki ~]# cat sample1.txt
hello
world
[root@zetawiki ~]# cat sample2.txt
hello
world!
[root@zetawiki ~]# cat sample3.txt
hello
world
tiger
[root@zetawiki ~]# diff3 sample1.txt sample2.txt sample3.txt
====
1:2c
  world
2:2c
  world!
3:2,3c
  world
  tiger
[root@zetawiki ~]# diff3 sample1.txt sample2.txt sample3.txt -A
2a
||||||| sample2.txt
world!
=======
world
tiger
>>>>>>> sample3.txt
.
1a
<<<<<<< sample1.txt
.

3 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}