Skip to content

Instantly share code, notes, and snippets.

@jxsl13
Last active January 26, 2023 08:49
Show Gist options
  • Save jxsl13/433afb82d9587d9cdd66960a1ef20cfa to your computer and use it in GitHub Desktop.
Save jxsl13/433afb82d9587d9cdd66960a1ef20cfa to your computer and use it in GitHub Desktop.
shell script for seeing the difference between two tar.gz file contents
#!/bin/bash
# tardiff tar1.tar.gz tar2.tar.gz
diff -q <(tar -xOvzf $1 | rev | cut -d\/ -f1 | rev) <(tar -xOvzf $2 | rev | cut -d\/ -f1 | rev)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment