From 3e75a55491eb327a6d807e5736d8bb02ae3cd637 Mon Sep 17 00:00:00 2001 From: Nicolas Crocfer Date: Sat, 31 Aug 2013 14:18:13 +0200 Subject: [PATCH] Added diff cheatsheet --- cheatsheets/diff | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 cheatsheets/diff diff --git a/cheatsheets/diff b/cheatsheets/diff new file mode 100644 index 0000000..e2024ea --- /dev/null +++ b/cheatsheets/diff @@ -0,0 +1,20 @@ +# 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