리눅스 diff

Jmnote (토론 | 기여)님의 2015년 8월 14일 (금) 17:23 판 (→‎개요)

1 개요

diff
/usr/bin/diff
  • 행 단위 파일 비교 명령어
[root@zetawiki ~]# cat 1.txt
hello
world
[root@zetawiki ~]# cat 2.txt
Hello
World!
[root@zetawiki ~]# diff 1.txt 2.txt
1,2c1,2
< hello
< world
---
> Hello
> World!
[root@zetawiki ~]# diff -u 1.txt 2.txt
--- 1.txt	2015-08-14 17:21:07.938002288 +0900
+++ 2.txt	2015-08-14 17:21:29.429003741 +0900
@@ -1,2 +1,2 @@
-hello
-world
+Hello
+World!

2 같이 보기

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