3 ms·
Title checks out. > md5sum md5.gif f5ca4f935d44b85c431a8bf788c0eaca md5.gif
by clishem 10y ago
Title checks out.
> md5sum md5.gif
f5ca4f935d44b85c431a8bf788c0eaca md5.gif
- joombaga 10y agoNever knew that md5sum took a file argument. I've always `md5sum <foo` Slightly embarrassing, but at least I wasn't `cat foo|md5sum`
- kevincox 10y agoIt's nice to hash a couple files and have the hashes displayed right next to each other :)
- coldpie 10y agoThe output format of md5sum and other checksum programs is well-defined, which lets you use the -c switch to verify. This is the format you see in checksum files when downloading source tarballs, distro ISOs, packages, etc. $ echo hello > fileone $ echo there > filetwo $ md5sum fileone filetwo | tee /tmp/ck b1946ac92492d2347c6235b4d2611184 fileone c4ff45bb1fab99f9164b7fec14b2292a filetwo $ md5sum -c /tmp/ck fileone: OK filetwo: OK $ echo oops > filetwo $ md5sum -c /tmp/ck fileone: OK filetwo: FAILED md5sum: WARNING: 1 computed checksum did NOT match Edit: Of course, nothing wrong with using stdin: $ wget -q -O- https://shells.aachen.ccc.de/~spq/md5.gif | md5sum f5ca4f935d44b85c431a8bf788c0eaca -
- nicky0 10y agoWhat's the -O- for?
- coldpie 10y agoOutput to stdout instead of a file on disk. See: https://linux.die.net/man/1/wget https://linux.die.net/man/1/wget
- cobbzilla 10y ago-O is the file to write output. plain - means stdout. so, run wget and print results to stdout. tip: add -S to include response http headers.
- deleted 10y ago[deleted]