- 差分を確認
diff FILE1 FILE2
- unified形式で差分を確認
diff -u FILE1 FILE2
- タブやスペースを無視して差分を確認
diff -E FILE1 FILE2
- 別サーバのファイルと差分を確認
ssh HOST cat ~/FILE | diff -u ~/FILE -
- ファイルに対するパッチを作成
diff -up FILE1 FILE2
- ディレクトリに対するパッチを作成
diff -uprN DIR1 DIR2
diff FILE1 FILE2
diff -u FILE1 FILE2
diff -E FILE1 FILE2
ssh HOST cat ~/FILE | diff -u ~/FILE -
diff -up FILE1 FILE2
diff -uprN DIR1 DIR2