I would like to get the sha1 checksums of all files inside a simple tar archive as a list, or a new fileWithout using the disk space to unpack the big tar file. Something with piping and calculating the sha1 on the fly, directing the output to /dev/nullI searched google a lot and did some experiments with pipes but could not get very far.Would really save me a lot of time checking backups.
How to create sha1 checksums of files inside a tar archive without using much disk space
command line;pipe;tar;hashsum
Too easy :tar xvJf myArchive.tar.xz --to-command=sha1sumThe result is like this :z/z/DOCUMENTATION3c4d9df9bcbd1fb756b1aaba8dd6a2db788a8659 *-z/getnameenv.sh1b7f1ef4bbb229e4dc5d280c3c9835d9d061726a *-Or create tarsha1.sh with :#!/bin/bashsha1=`sha1sum`echo -n $sha1 | sed 's/ .*$//'echo  $TAR_FILENAMEThen use it this way :tar xJf myArchive.tar.xz --to-command=./tarsha1.shThe result is like this :3c4d9df9bcbd1fb756b1aaba8dd6a2db788a8659 z/DOCUMENTATION1b7f1ef4bbb229e4dc5d280c3c9835d9d061726a z/getnameenv.sh