I have this directory "lubuntu14.04", contents shown below:
Code:
$ ll
total 1406360
-rw-rw-r--. 1 a adm 727711744 5月 18 2015 lubuntu-14.04-desktop-amd64.iso
-rwxrwxrwx. 1 a adm 716177408 12月 1 2014 lubuntu-14.04-desktop-i386.iso*
-rw-rw-r--. 1 a a 0 8月 29 09:27 new.sign
-rw-rw-r--. 1 a a 2722 8月 5 04:40 SHA256SUMS
-rw-rw-r--. 1 a a 933 8月 5 04:40 SHA256SUMS.gpg
I would like to generate a sha256 checksum for the downloaded ISO file "lubuntu-14.04-desktop-i386.iso" and compare it to the official sha256 checksum listed in the downloaded "SHA256SUMS" file.
Attempt 1:
Code:
$ sha256sum -c SHA256SUMS 2>&1 | grep OK
lubuntu-14.04-desktop-amd64.iso: OK
lubuntu-14.04-desktop-i386.iso: OK
Unfortunately the command above checks the "*amd64.iso" file in addition, slowing down the whole process. So I check the sha256sum manual file, and all I can find is:
Quote:
-c, --check
read SHA256 sums from the FILEs and
check them
|
Actually the manual file for sha256sum is so short, that there probably isn't the functionality I am looking for.
In this next attempt I write the ISO's full name after the "SHA256SUMS" file:
Attempt 2:
Code:
lubuntu14.04$ sha256sum -c SHA256SUMS lubuntu-14.04-desktop-i386.iso 2>&1 | grep OK
lubuntu-14.04-desktop-amd64.iso: OK
lubuntu-14.04-desktop-i386.iso: OK
The command sha256sum still checks the unwanted "*amd64.iso" ISO file.
Is there a way to only check the *.i386.iso file when both ISO files are in the directory "lubuntu14.04"?