Skip to content

Instantly share code, notes, and snippets.

@skurscheid
Created June 12, 2020 01:23
Show Gist options
  • Save skurscheid/4508f1cc5f3a74a0cfdb1df7d4982de6 to your computer and use it in GitHub Desktop.
Save skurscheid/4508f1cc5f3a74a0cfdb1df7d4982de6 to your computer and use it in GitHub Desktop.
creating a tar file with on-the-fly md5sum check of included content - example
#!/bin/bash
# from: https://serverfault.com/questions/120582/creating-a-tar-file-with-checksums-included#120597
tar -cvpf mybackup.tar myfiles/| xargs -I '{}' sh -c "test -f '{}' && md5sum '{}'" | tee mybackup.md5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment