Options (8)
-w, --ignore-all-spacebooleanCompare files, ignoring white spaces
diff {{[-w|--ignore-all-space]}} {{old_file}} {{new_file}}-y, --side-by-sidebooleanCompare files, showing the differences side by side
diff {{[-y|--side-by-side]}} {{old_file}} {{new_file}}-u, --unifiedbooleanCompare files, showing the differences in unified format (as used by `git diff`)
diff {{[-u|--unified]}} {{old_file}} {{new_file}}-r, --recursivebooleanCompare directories recursively (shows names for differing files/directories as well as changes made to files)
diff {{[-r|--recursive]}} {{old_directory}} {{new_directory}}-q, --briefbooleanCompare directories, only showing the names of files that differ
diff {{[-r|--recursive]}} {{[-q|--brief]}} {{old_directory}} {{new_directory}}-a, --textbooleanCreate a patch file for Git from the differences of two text files, treating nonexistent files as empty
diff {{[-a|--text]}} {{[-u|--unified]}} {{[-N|--new-file]}} {{old_file}} {{new_file}} > {{diff.patch}}-N, --new-filebooleanCreate a patch file for Git from the differences of two text files, treating nonexistent files as empty
diff {{[-a|--text]}} {{[-u|--unified]}} {{[-N|--new-file]}} {{old_file}} {{new_file}} > {{diff.patch}}-d, --minimalbooleanCompare files, showing output in color and try hard to find smaller set of changes
diff {{[-d|--minimal]}} --color=always {{old_file}} {{new_file}}Examples (8)
Compare files (lists changes to turn `old_file` into `new_file`)
diff old_file new_fileCompare files, ignoring white spaces
diff [-w|--ignore-all-space] old_file new_fileCompare files, showing the differences side by side
diff [-y|--side-by-side] old_file new_fileCompare files, showing the differences in unified format (as used by `git diff`)
diff [-u|--unified] old_file new_fileCompare directories recursively (shows names for differing files/directories as well as changes made to files)
diff [-r|--recursive] old_directory new_directoryCompare directories, only showing the names of files that differ
diff [-r|--recursive] [-q|--brief] old_directory new_directoryCreate a patch file for Git from the differences of two text files, treating nonexistent files as empty
diff [-a|--text] [-u|--unified] [-N|--new-file] old_file new_file > diff.patchCompare files, showing output in color and try hard to find smaller set of changes
diff [-d|--minimal] --color=always old_file new_file