{"id":6402,"date":"2019-08-28T08:27:17","date_gmt":"2019-08-28T08:27:17","guid":{"rendered":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?p=6402"},"modified":"2019-08-28T08:27:51","modified_gmt":"2019-08-28T08:27:51","slug":"how-to-work-with-file-checksums","status":"publish","type":"post","link":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-work-with-file-checksums\/","title":{"rendered":"How to work with file checksums?"},"content":{"rendered":"<p>The article explains how you can generate file checksums and verify file integrity.<\/p>\n<h2>What are checksums?<\/h2>\n<p>A checksum that is also called a hash, is an alphanumeric value that uniquely represents the contents of a file. Checksums are mainly used to verify the integrity of files downloaded from an external source, such as an installation file. For example, you can generate checksums for your backup files, and then verify that they are not been corrupted or altered at a later date.<\/p>\n<p>MD5 and SHA-1 are the two checksum algorithms that are used most commonly. While verifying checksums, you must remember that you need to use the same algorithm that was used previously to generate checksums. This is because a file with MD5 checksum value is different from its SHA-1 checksum value.<\/p>\n<h2># Steps to generate Checksums<\/h2>\n<p>All hosting servers from MilesWeb include command-line programs that are used to generate MD5 and SHA-1 checksums.<\/p>\n<p>Perform the following steps to generate a file checksum and store the value in a file:<\/p>\n<p>1. Log in to the account using SSH.<\/p>\n<p>2. Type the following commands, in the command prompt:<\/p>\n<p>(i) Command to generate an MD5 checksum,<\/p>\n<pre class=\"trim-whitespace:false lang:default decode:true \">md5sum filename &gt; md5sums.txt<\/pre>\n<p>(ii) Command to generate an SHA-1 checksum,<\/p>\n<pre class=\"trim-whitespace:false lang:default decode:true \">sha1sum filename &gt; sha1sums.txt<\/pre>\n<p>Replace filename with the name of a file for which you want to generate a checksum.<\/p>\n<p>Now, the md5sums.txt (or sha1sums.txt) contains a file listing and associated checksums.<\/p>\n<p><strong>Note:<\/strong> Generating multiple checksums at once is also possible. For example, to generate MD5 checksums for all of the .zip files in the current directory, type following command :<\/p>\n<pre class=\"trim-whitespace:false lang:default decode:true \">md5sum *.zip &gt; md5sums.txt<\/pre>\n<p>Similarly, you can generate MD5 checksums for all of the files in the current directory and all the directories below it, by typing the following command :<\/p>\n<pre class=\"trim-whitespace:false lang:default decode:true \">find . -type f -exec md5sum {} &gt; md5sums.txt \\;<\/pre>\n<p>Replace md5sum with sha1sum to generate SHA-1 checksums instead.<\/p>\n<h2># Steps to verify checksums<\/h2>\n<p>Perform the following steps to verify the file checksums :<\/p>\n<p>1. Using SSH login to your account.<\/p>\n<p>2. Type the following commands in the command prompt depending on the algorithms (MD5 or SHA-1) that were previously used to generate the checksums. In these examples filenames md5sums.txt and sha1sums.txt are used, so if you have stored the checksums in a different file, use that file name :<\/p>\n<p><strong>(i) Command to verify MD5 checksums<\/strong> :<\/p>\n<pre class=\"trim-whitespace:false lang:default decode:true \">md5sum -c md5sums.txt<\/pre>\n<p><strong>(ii) Command to verify SHA-1 checksums :<\/strong><\/p>\n<pre class=\"trim-whitespace:false lang:default decode:true \">sha1sum -c sha1sums.txt<\/pre>\n<p>The matching checksum will display OK, while mismatched checksum will display FAILED.<\/p>\n<p>When you check a lot of files, mismatched results can get lost among all the passing results. So, to display only the mismatched checksums, use the quiet option. Example :<\/p>\n<pre class=\"trim-whitespace:false lang:default decode:true \">sha1sum --quiet -c sha1sums. txt<\/pre>\n<p><strong>Note:<\/strong> the md5sum and sha1sum programs run on Linux operating systems. So, to generate and verify checksums on a computer that is running Apple Mac OS X, you can use the md5 and shasum programs. For the Microsoft Windows computer, you can install one of the many programs available for download to generate and verify checksum.<\/p>\n<p><strong>Also Read :<\/strong><\/p>\n<p><strong>1) <a href=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/introduction-python-script-basics\/\">{Introduction} \u2013 Python script basics<\/a><\/strong><\/p>\n<p><strong>2)\u00a0<a href=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/introduction-perl-script-basics\/\">{Introduction} \u2013 Perl Script Basics<\/a><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The article explains how you can generate file checksums and verify file integrity. What are checksums? A checksum that is also called a hash, is an alphanumeric value that uniquely represents the contents of a file. Checksums are mainly used to verify the integrity of files downloaded from an external source, such as an installation [&hellip;]<\/p>\n","protected":false},"author":18,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[39],"tags":[973,974],"class_list":["post-6402","post","type-post","status-publish","format-standard","placeholder-for-hentry","category-windows-hosting-faq","tag-checksums","tag-file-checksums"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to work with file checksums? - Web Hosting FAQs by MilesWeb<\/title>\n<meta name=\"description\" content=\"Learn to work with file checksums.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-work-with-file-checksums\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to work with file checksums? - Web Hosting FAQs by MilesWeb\" \/>\n<meta property=\"og:description\" content=\"Learn to work with file checksums.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-work-with-file-checksums\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Hosting FAQs by MilesWeb\" \/>\n<meta property=\"article:published_time\" content=\"2019-08-28T08:27:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-08-28T08:27:51+00:00\" \/>\n<meta name=\"author\" content=\"Sonam Wagh\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sonam Wagh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-work-with-file-checksums\/\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-work-with-file-checksums\/\",\"name\":\"How to work with file checksums? - Web Hosting FAQs by MilesWeb\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website\"},\"datePublished\":\"2019-08-28T08:27:17+00:00\",\"dateModified\":\"2019-08-28T08:27:51+00:00\",\"author\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/dc645d02823c86e07e53798ebe02c6f4\"},\"description\":\"Learn to work with file checksums.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-work-with-file-checksums\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-work-with-file-checksums\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-work-with-file-checksums\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to work with file checksums?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/\",\"name\":\"Web Hosting FAQs by MilesWeb\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/dc645d02823c86e07e53798ebe02c6f4\",\"name\":\"Sonam Wagh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9cb2cf6ae11d7625ef6417ef8e84ba25?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9cb2cf6ae11d7625ef6417ef8e84ba25?s=96&d=blank&r=g\",\"caption\":\"Sonam Wagh\"},\"description\":\"With an interest in doing something creative daily, Sonam works as a Digital Marketing Executive. She likes to write technical blogs related to web hosting, digital marketing, and other IT topics. She also likes to spend her leisure time on social media to find different strategies for client engagement.\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/author\/sonam\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to work with file checksums? - Web Hosting FAQs by MilesWeb","description":"Learn to work with file checksums.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-work-with-file-checksums\/","og_locale":"en_GB","og_type":"article","og_title":"How to work with file checksums? - Web Hosting FAQs by MilesWeb","og_description":"Learn to work with file checksums.","og_url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-work-with-file-checksums\/","og_site_name":"Web Hosting FAQs by MilesWeb","article_published_time":"2019-08-28T08:27:17+00:00","article_modified_time":"2019-08-28T08:27:51+00:00","author":"Sonam Wagh","twitter_misc":{"Written by":"Sonam Wagh","Estimated reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-work-with-file-checksums\/","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-work-with-file-checksums\/","name":"How to work with file checksums? - Web Hosting FAQs by MilesWeb","isPartOf":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website"},"datePublished":"2019-08-28T08:27:17+00:00","dateModified":"2019-08-28T08:27:51+00:00","author":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/dc645d02823c86e07e53798ebe02c6f4"},"description":"Learn to work with file checksums.","breadcrumb":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-work-with-file-checksums\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-work-with-file-checksums\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-work-with-file-checksums\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/"},{"@type":"ListItem","position":2,"name":"How to work with file checksums?"}]},{"@type":"WebSite","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/","name":"Web Hosting FAQs by MilesWeb","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/dc645d02823c86e07e53798ebe02c6f4","name":"Sonam Wagh","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/9cb2cf6ae11d7625ef6417ef8e84ba25?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9cb2cf6ae11d7625ef6417ef8e84ba25?s=96&d=blank&r=g","caption":"Sonam Wagh"},"description":"With an interest in doing something creative daily, Sonam works as a Digital Marketing Executive. She likes to write technical blogs related to web hosting, digital marketing, and other IT topics. She also likes to spend her leisure time on social media to find different strategies for client engagement.","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/author\/sonam\/"}]}},"views":635,"_links":{"self":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/6402","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/comments?post=6402"}],"version-history":[{"count":2,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/6402\/revisions"}],"predecessor-version":[{"id":6404,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/6402\/revisions\/6404"}],"wp:attachment":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/media?parent=6402"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/categories?post=6402"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/tags?post=6402"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}