Skip to content

Instantly share code, notes, and snippets.

@AleXoundOS
Created October 22, 2023 14:23
Show Gist options
  • Save AleXoundOS/eac725ef40f307b31e26afc296e85595 to your computer and use it in GitHub Desktop.
Save AleXoundOS/eac725ef40f307b31e26afc296e85595 to your computer and use it in GitHub Desktop.
reproducible tar (e.g. for comparing the whole contents of directories recursively)
# /usr/bin/env bash
set -o nounset
tar --sort=name --mtime=0 --owner=0 --group=0 --numeric-owner -c "$1" | sha256sum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment