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

잔글 (봇: 자동으로 텍스트 교체 (-<source lang='cli'> +<source lang='console'>))
6번째 줄: 6번째 줄:


==예시==
==예시==
<source lang='cli'>
<source lang='console'>
[root@zetawiki ~]# cat sample1.txt
[root@zetawiki ~]# cat sample1.txt
hello
hello
world
world
</source>
</source>
<source lang='cli'>
<source lang='console'>
[root@zetawiki ~]# cat sample2.txt
[root@zetawiki ~]# cat sample2.txt
hello
hello
world!
world!
</source>
</source>
<source lang='cli'>
<source lang='console'>
[root@zetawiki ~]# cat sample3.txt
[root@zetawiki ~]# cat sample3.txt
hello
hello
22번째 줄: 22번째 줄:
tiger
tiger
</source>
</source>
<source lang='cli'>
<source lang='console'>
[root@zetawiki ~]# diff3 sample1.txt sample2.txt sample3.txt
[root@zetawiki ~]# diff3 sample1.txt sample2.txt sample3.txt
====
====
33번째 줄: 33번째 줄:
   tiger
   tiger
</source>
</source>
<source lang='cli'>
<source lang='console'>
[root@zetawiki ~]# diff3 sample1.txt sample2.txt sample3.txt -A
[root@zetawiki ~]# diff3 sample1.txt sample2.txt sample3.txt -A
2a
2a

2016년 3월 29일 (화) 12:26 판

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