Next: , Up: diff


A.9.1 diff のオプション

diff では、以下の標準オプションが利用できます (完全な記述は see Common options):

-D date
date 以前の最も新しいリビジョンを利用します。 このオプションを比較に用いた時の効果は ‘-r’ を参照して下さい。
-k kflag
kfalg に従ってキーワード置換を行います。Keyword substitution, 参照。
-l
Local、つまり現在の作業ディレクトリでのみコマンドが 実行されます。
-R
ディレクトリを再帰的に調べます。 このオプションは指定しなくても実行されます。
-r tag
リビジョン tag と比較します。 オプション ‘-r’ は最大二つまで使用できます。 オプション ‘-r’ を指定しない場合、 作業ファイルをその由来となったリビジョンと比較します。 オプション ‘-r’ を一つ指定した場合、 指定したリビジョンと作業ファイルとを比較します。 オプション ‘-r’ を二つ指定した場合、 指定した二つのリビジョンを比較します (作業ファイルが結果に影響を与えることはありません)。

一つもしくは両方のオプション ‘-r’ を、前述の オプション ‘-D date’ と交換することができます。

以下のオプションは出力の書式を指定します。 意味は GNU diff と同じです。

     -0 -1 -2 -3 -4 -5 -6 -7 -8 -9
     --binary
     --brief
     --changed-group-format=arg
     -c
       -C nlines
       --context[=lines]
     -e --ed
     -t --expand-tabs
     -f --forward-ed
     --horizon-lines=arg
     --ifdef=arg
     -w --ignore-all-space
     -B --ignore-blank-lines
     -i --ignore-case
     -I regexp
        --ignore-matching-lines=regexp
     -h
     -b --ignore-space-change
     -T --initial-tab
     -L label
       --label=label
     --left-column
     -d --minimal
     -N --new-file
     --new-line-format=arg
     --old-line-format=arg
     --paginate
     -n --rcs
     -s --report-identical-files
     -p
     --show-c-function
     -y --side-by-side
     -F regexp
     --show-function-line=regexp
     -H --speed-large-files
     --suppress-common-lines
     -a --text
     --unchanged-group-format=arg
     -u
       -U nlines
       --unified[=lines]
     
     
     
     -V arg
     -W columns
       --width=columns