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

잔글 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>, -<source +<syntaxhighlight ))
 
(사용자 3명의 중간 판 14개는 보이지 않습니다)
4번째 줄: 4번째 줄:
*행 단위 파일 비교 명령어
*행 단위 파일 비교 명령어


<source lang='dos'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# cat 1.txt
[root@zetawiki ~]# cat 1.txt
hello
Hello
world
World
[root@jmnote ~]# cat 2.txt
[root@zetawiki ~]# cat 2.txt
Hello
Hello
World!
World!
</source>
Lorem
<source lang='dos'>
</syntaxhighlight>
[root@jmnote ~]# diff 1.txt 2.txt
<syntaxhighlight lang='console'>
1,2c1,2
[root@zetawiki ~]# diff 1.txt 2.txt
< hello
2c2,3
< world
< World
---
---
> Hello
> World!
> World!
</source>
> Lorem
</syntaxhighlight>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# diff -u 1.txt 2.txt
--- 1.txt 2015-09-13 11:29:19.067001429 +0900
+++ 2.txt 2015-09-13 11:29:46.845001492 +0900
@@ -1,2 +1,3 @@
Hello
-World
+World!
+Lorem
</syntaxhighlight>


==같이 보기==
==같이 보기==
*[[리눅스 diff 폴더 비교]]
*[[diff 패치 파일 만들기]]
*[[리눅스 diff3]]
*[[리눅스 comm]]
*[[리눅스 cmp]]
*[[리눅스 cmp]]
*[[리눅스 cat]]
*[[리눅스 cat]]
*[[리눅스 diff3]]
*[[리눅스 colordiff]]
*[[colordiff]]
*[[리눅스 patch]]
*[[리눅스 diffstat]]
 
== 참고 ==
* {{위키백과|diff}}


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

2021년 7월 17일 (토) 17:45 기준 최신판

1 개요[ | ]

diff
/usr/bin/diff
  • 행 단위 파일 비교 명령어
[root@zetawiki ~]# cat 1.txt
Hello
World
[root@zetawiki ~]# cat 2.txt
Hello
World!
Lorem
[root@zetawiki ~]# diff 1.txt 2.txt
2c2,3
< World
---
> World!
> Lorem
[root@zetawiki ~]# diff -u 1.txt 2.txt
--- 1.txt	2015-09-13 11:29:19.067001429 +0900
+++ 2.txt	2015-09-13 11:29:46.845001492 +0900
@@ -1,2 +1,3 @@
 Hello
-World
+World!
+Lorem

2 같이 보기[ | ]

3 참고[ | ]

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