checksum remote file

rich picture rich · Jul 23, 2011 · Viewed 17.4k times · Source

Is there a way to get a program I can run via the command line that would do a checksum of a remote file? For instance get a checksum of https://stackoverflow.com/opensearch.xml

I want to be able get an update of when a new rss/xml entry is available. I was thinking I could do a checksum of a file every once in a while and if it is different then there must be an update. I'm looking to write a shell script that checks new rss/xml data.

Answer

elec3647 picture elec3647 · Sep 8, 2015

A quick way to do this with curl is to pipe the output to sha1sum as follows:

curl -s http://stackoverflow.com/opensearch.xml|sha1sum