colordiff [options] file1 file2 [dir1 dir2]
Useful options
-s, --report-identical-filesreport when two files are the same (there is no output when same as default)
파일이 완전히 같을 경우, 같다고 출력해준다. (기본적으로 아무 출력도 안 한다.)
-b, --ignore-space-change
ignore changes in the amount of white space
빈 칸 부분이 다른 경우 무시한다.
-r, --recursive
recursively compare any subdirectories found
하위 디렉토리도 비교한다.
Analysis of a result
$diff oldfile newfile5c5
< this line 5 of oldfile is different from
> this line 5 of newfile.
7d6
< this line 7 of oldfile only appears in oldfile, does not appear in newfile.
21a22
> this line 22 of newfile is a missing line at line 21 of oldfile
#1[cda]#2
#1 is a line number of oldfile
#2 is a line number of newfile
'c' means 'change' to sync
'd' means 'delete' the line #1 of oldfile to sync
'a' means 'add' the line #2 of newfile after the line #1 of oldfile to sync
< means a line of oldfile
> means a line of newfile
댓글 없음:
댓글 쓰기