1
0
mirror of https://github.com/cheat/cheat.git synced 2024-12-23 04:59:45 +01:00
cheat/cheatsheets/diff
adelviscio 6d0e99b956 Added diff of two processes/commands
Wraps output of two commands into separate file handles that diff can compare.
2013-09-01 17:48:33 -04:00

24 lines
570 B
Plaintext

# 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)