Unix 中的 Diff 命令用于查找文件(所有类型)之间的差异。因为目录也是一种文件类型,所以可以通过使用 diff 命令轻松地找出两个目录之间的差异。如需更多选项,请在 Unix 机顶盒上使用 man diff。
-b Ignores trailing blanks (spaces and tabs)
and treats other strings of blanks as
equivalent.
-i Ignores the case of letters. For example,
`A' will compare equal to `a'.
-t Expands <TAB> characters in output lines.
Normal or -c output adds character(s) to the
front of each line that may adversely affect
the indentation of the original source lines
and make the output lines difficult to
interpret. This option will preserve the
original source's indentation.
-w Ignores all blanks (<SPACE> and <TAB> char-
acters) and treats all other strings of
blanks as equivalent. For example,
`if ( a == b )' will compare equal to
`if(a==b)'.