Recent Comments
변군이글루
[명령어] diff 명령어 본문
diff 명령어
diff 명령어는 두 파일을 한 줄씩 훑어서 차이점을 찾아낸다.
$ diff [옵션] from_file1 to_file2
옵션
-b : 연속 된 공백을 무시(spaces 와 tabs)
-i : 대소문자를 구분하지 않음
-t : 출력 라인에 TAB 문자를 넣음
-w : 두 행의 비교 시 공백을 무시
--brief : 대략적인 파일의 다른 점을 보고
-d : 미세한 차이까지 찾도록 함
-H : 큰 파일을 빠르게 처리하기 위해 사용
-q : 두 파일의 차이점만 출력
-s : 두 파일이 같은 때 보고
diff는 첫 번째 파일을 어떻게 수정해야 두 번째 파일과 같아지느냐를 나타내므로
다음과 같은 의미가 있다.
a 파일 2에서 파일 1로 첨가되어야 할 내용
b 파일 1 에서 제거되어야 할 내용
c 두 파일의 내용이 바꿔어야 할 내용
< 파일 2 의 내용이 바꿔어야 파일 1 이 될 내용
> 파일 1의 내용이 바꿔어야 파일 2 가 될 내용
diff –Nur a.txt b.txt
###diff 명령어
$ diff -Nur /usr/local/apache2/conf/httpd.conf /usr/local/apache2/conf/httpd.conf.bk
--- /usr/local/apache2/conf/httpd.conf 2020-12-31 01:30:05.316756750 +0000
+++ /usr/local/apache2/conf/httpd.conf.bk 2020-12-31 01:29:03.731039593 +0000
@@ -380,8 +380,6 @@
</IfModule>
<IfModule mime_module>
- AddType application/x-httpd-php-source .phps
-AddType application/x-httpd-php .htm .html .php .ph .phtml .inc
#
# TypesConfig points to the file containing the list of mappings from
# filename extension to MIME-type.
colordiff 명령어
colordiff 설치
yum install -y colordiff
colordiff a.txt b.txt
'* 리눅스' 카테고리의 다른 글
[Shell Script] 반복문 for 문법 (0) | 2021.01.07 |
---|---|
[Apache] Apache 로그 logrotate(로테이드) 설정 (0) | 2021.01.07 |
[명령어] diff 명령어 (0) | 2020.12.31 |
[명령어] sed 명령어 (0) | 2020.12.31 |
[VPN] Linux에서 SoftEther VPN 클라이언트 설치-2 (0) | 2020.12.30 |
[VPN] Linux에서 SoftEther VPN 클라이언트 설치 (0) | 2020.12.29 |
0 Comments