리눅스 diff

Jmnote bot (토론 | 기여)님의 2016년 3월 29일 (화) 12:25 판 (봇: 자동으로 텍스트 교체 (-<source lang='cli'> +<source lang='console'>))

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 같이 보기

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