"리눅스 diff3"의 두 판 사이의 차이

 
(사용자 2명의 중간 판 2개는 보이지 않습니다)
6번째 줄: 6번째 줄:


==예시==
==예시==
<source lang='cli'>
<source lang='console'>
[root@zetawiki ~]# cat a.txt
[root@zetawiki ~]# cat sample1.txt
hello
hello
world
world
</source>
</source>
<source lang='cli'>
<source lang='console'>
[root@zetawiki ~]# cat b.txt
[root@zetawiki ~]# cat sample2.txt
hello
hello
world!
world!
</source>
</source>
<source lang='cli'>
<source lang='console'>
[root@zetawiki ~]# cat c.txt
[root@zetawiki ~]# cat sample3.txt
hello
hello
world
world
hello
tiger
</source>
</source>
<source lang='cli'>
<source lang='console'>
[root@zetawiki ~]# diff3 a.txt b.txt c.txt
[root@zetawiki ~]# diff3 sample1.txt sample2.txt sample3.txt
====
====
1:2c
1:2c
31번째 줄: 31번째 줄:
3:2,3c
3:2,3c
   world
   world
   hello
   tiger
</source>
</source>
<source lang='cli'>
<source lang='console'>
[root@zetawiki ~]# diff3 a.txt b.txt c.txt -A
[root@zetawiki ~]# diff3 sample1.txt sample2.txt sample3.txt -A
2a
2a
||||||| b.txt
||||||| sample2.txt
world!
world!
=======
=======
world
world
hello
tiger
>>>>>>> c.txt
>>>>>>> sample3.txt
.
.
1a
1a
<<<<<<< a.txt
<<<<<<< sample1.txt
.
.
</source>
</source>
53번째 줄: 53번째 줄:


[[분류: /usr/bin]]
[[분류: /usr/bin]]
[[분류: 파일 비교 도구]]

2017년 9월 17일 (일) 23:25 기준 최신판

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 }}