Hello everyone,
I am looking to basically creating md5sum files for all iso files in a directory and archive the resulting md5 files into a single archive in that very same directory.
I worked out a clumsy solution such as:
#find files for which md5sum are to be created and store the resulting md5sum in a particular file
find ./ -name "*.iso" |
while read F
do
G=$(echo "$F".md5 | sed 's/^..//')
md5sum $F > $G
done
#create the tar archive with the new created md5 files
tar -cvf archive.tar *.md5
#remvove the md5 files
rm *.md5
but I am not satisfied by the result since:
1- it actually writes the temporary md5 files that I need to remove after the archive is done
2- it is clumsy
I feel that this whole thing can be wrapped in a single line command, but fail to see how to do.
Any help would be appreciated.
Regards,