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

잔글 (로봇: 자동으로 텍스트 교체 (-[root@jmnote +[root@zetawiki))
 
(사용자 2명의 중간 판 4개는 보이지 않습니다)
5번째 줄: 5번째 줄:
*세 파일의 차이를 보여줌
*세 파일의 차이를 보여줌


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


26번째 줄: 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 }}