Created
June 12, 2020 01:23
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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