Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
26 lines (18 sloc)
646 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # To view the differences between two files: | |
| diff -u <file-1> <file-2> | |
| # To view the differences between two directories: | |
| diff -ur <dir-1> <dir-2> | |
| # To ignore whitespace: | |
| diff -ub <file-1> <file-2> | |
| # To ignore blank lines: | |
| diff -uB <file-1> <file-2> | |
| # To ignore the differences between uppercase and lowercase: | |
| diff -ui <file-1> <file-2> | |
| # To report whether the files differ: | |
| diff -q <file-1> <file-2> | |
| # To report whether the files are identical: | |
| diff -s <file-1> <file-2> | |
| # To diff the output of two commands or scripts: | |
| diff <(command1) <(command2) | |
| # To generate a patch file from two files: | |
| diff -Naur <file-1> <file-2> > <patch-file> |

