cheat-fork-echo/cheat/cheatsheets/diff

27 lines
655 B
Plaintext
Raw Normal View History

2013-08-31 14:18:13 +02:00
# To view the differences between two files:
diff -u version1 version2
# To view the differences between two directories:
diff -ur folder1/ folder2/
# To ignore the white spaces:
diff -ub version1 version2
# To ignore the blank lines:
diff -uB version1 version2
# To ignore the differences between uppercase and lowercase:
diff -ui version1 version2
# To report whether the files differ:
diff -q version1 version2
# To report whether the files are identical:
diff -s version1 version2
# To diff the output of two commands or scripts:
diff <(command1) <(command2)
2016-09-01 23:44:19 +02:00
# Generate a patch file from two files
2016-11-27 16:31:49 +01:00
diff -Naur version1 version2 > version.patch