리눅스 cmp

Jmnote bot (토론 | 기여)님의 2015년 2월 6일 (금) 03:34 판 (로봇: 자동으로 텍스트 교체 (-<source lang='dos'> +<source lang='cli'>))

1 개요

cmp
/usr/bin/cmp
  • 파일 비교 리눅스 명령어
  • 한 행씩 비교하여 다른 점이 있으면 다르다는 메시지와 함께 종료
  • 다른 점이 없으면 아무 메시지 없음
[root@jmnote ~]# cat 1.txt
hello
world
[root@jmnote ~]# cat 2.txt
Hello
World!
[root@jmnote ~]# cmp 1.txt 1.txt
[root@jmnote ~]# cmp 1.txt 2.txt
1.txt 2.txt differ: byte 1, line 1

2 같이 보기

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