Browse Docs

๐Ÿšฉ Compare

On this page

Compare files

1diff <file1> <file2>       # -w to ignore whitespace.
2colordiff <file1> <file2>  # colourised diff.
3wdiff <file1> <file2>      # word diff: [โˆ’ โˆ’] replaced word, {+ +} added word.
4vimdiff <file1> <file2>    # open both files in vim (blue = entirely different lines, red = partially different).
5fgrep -f <list> <file>     # compare two lists (e.g. of hosts).

Compare jar files

1diff -W200 -y  <(unzip -vqq file1.jar | awk '{ if ($1 > 0) {printf("%s\t%s\n", $1, $8)}}' | sort -k2) <(unzip -vqq  file2.jar | awk '{ if ($1 > 0) {printf("%s\t%s\n", $1, $8)}}' | sort -k2)
Sunday, October 4, 2026 Sunday, August 27, 2023