{"id":147,"date":"2005-09-13T17:42:35","date_gmt":"2005-09-13T14:42:35","guid":{"rendered":"https:\/\/void.gr\/kargig\/blog\/?p=147"},"modified":"2005-10-12T01:38:07","modified_gmt":"2005-10-11T22:38:07","slug":"crude-script-for-sfv-checking","status":"publish","type":"post","link":"https:\/\/www.void.gr\/kargig\/blog\/2005\/09\/13\/crude-script-for-sfv-checking\/","title":{"rendered":"crude script for sfv checking"},"content":{"rendered":"<p>Most of the times, when I download something and there&#8217;s an sfv file available I check the files against the sfv. That saves me from a lot of trouble later on&#8230;<br \/>\nWhat I wanted though, was to have the sfv check program create a dir inside each folder it checks that would include the details from the sfv scanning. That way you can instantly know whether what you have downloaded 1 week ago is ok, or there are bad files inside, or missing files. I sometimes used to check what I downloaded against the sfv file but I forgot to move it to my &#8220;complete&#8221; folder. So I made a VERY crude script that does exactly what I want. It uses pure-sfv (which I think is a bit faster than all the others I&#8217;ve tested) and then parses the output to create a dir that looks like this:<\/p>\n<blockquote><p> [ 49 OK, 0 BAD, 0 MISSING, OUT OF 49 ]  <\/p><\/blockquote>\n<p>Here&#8217;s the script&#8230;<br \/>\n<code>#!\/bin\/bash<\/p>\n<p>THEOLDDIR=`ls -1 | grep \"MISSING, OUT OF\"` ; rm -rf \"$THEOLDDIR\"<br \/>\nACTION=`pure-sfv *.sfv | egrep \"different CRC|Tested|No such file\" > check.tst`<br \/>\nTHEBADONES=`grep different check.tst`<br \/>\nTHEMISSONES=`grep \"No such file\" check.tst`<br \/>\nLINECOUNT=`wc -l check.tst | cut -d\" \" -f 1`<br \/>\nOKFILES=`tail -n1 check.tst | cut -d\" \" -f5 | cut -d\",\" -f1 `<br \/>\nBADFILES=`tail -n1 check.tst | cut -d\" \" -f7 | cut -d\",\" -f1 `<br \/>\nMISSFILES=`tail -n1 check.tst | cut -d\" \" -f9`<br \/>\nwhile read line ;do<br \/>\n   BADIS=`echo $line | cut -d\" \" -f 1`<br \/>\n   if [ $BADIS != \"Tested\" ]; then<br \/>\n        if [ -e $BADIS ]; then<br \/>\n        mv $BADIS $BADIS.bad<br \/>\n        else<br \/>\n        touch $BADIS.missing<br \/>\n        fi<br \/>\n   fi<br \/>\ndone &lt; check.tst<br \/>\necho \"$THEBADONES\"<br \/>\necho \"$THEMISSONES\"<br \/>\necho \"$OKFILES OK, $BADFILES BAD, $MISSFILES MISSING, OUT OF $[$OKFILES+$BADFILES+$MISSFILES]\"<br \/>\nmkdir -p \"[ $OKFILES OK, $BADFILES BAD, $MISSFILES MISSING, OUT OF $[$OKFILES+$BADFILES+$MISSFILES] ]\" ; rm -f check.tst<br \/>\n<\/code><\/p>\n<p><em><strong>USE IT AT YOUR OWN RISK!!! IT MAY DELETE ALL YOUR FILES. IT WON&#8217;T BE MY FAULT!<\/strong><\/em><\/p>\n<p>and yes I know the code sucks. If you don&#8217;t like it don&#8217;t use it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Most of the times, when I download something and there&#8217;s an sfv file available I check the files against the sfv. That saves me from a lot of trouble later on&#8230; What I wanted though, was to have the sfv check program create a dir inside each folder it checks that would include the details [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ep_exclude_from_search":false,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-147","post","type-post","status-publish","format-standard","hentry","category-linux"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.3 - aioseo.com -->\n\t<meta name=\"description\" content=\"Most of the times, when I download something and there&#039;s an sfv file available I check the files against the sfv. That saves me from a lot of trouble later on... What I wanted though, was to have the sfv check program create a dir inside each folder it checks that would include the details\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"kargig\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.void.gr\/kargig\/blog\/2005\/09\/13\/crude-script-for-sfv-checking\/\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.3\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/2005\\\/09\\\/13\\\/crude-script-for-sfv-checking\\\/#article\",\"name\":\"crude script for sfv checking | Into.the.Void.\",\"headline\":\"crude script for sfv checking\",\"author\":{\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/author\\\/site-admin\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/#organization\"},\"datePublished\":\"2005-09-13T17:42:35+03:00\",\"dateModified\":\"2005-10-12T01:38:07+03:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/2005\\\/09\\\/13\\\/crude-script-for-sfv-checking\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/2005\\\/09\\\/13\\\/crude-script-for-sfv-checking\\\/#webpage\"},\"articleSection\":\"Linux\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/2005\\\/09\\\/13\\\/crude-script-for-sfv-checking\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/category\\\/linux\\\/#listItem\",\"name\":\"Linux\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/category\\\/linux\\\/#listItem\",\"position\":2,\"name\":\"Linux\",\"item\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/category\\\/linux\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/2005\\\/09\\\/13\\\/crude-script-for-sfv-checking\\\/#listItem\",\"name\":\"crude script for sfv checking\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/2005\\\/09\\\/13\\\/crude-script-for-sfv-checking\\\/#listItem\",\"position\":3,\"name\":\"crude script for sfv checking\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/category\\\/linux\\\/#listItem\",\"name\":\"Linux\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/#organization\",\"name\":\"Into.the.Void.\",\"description\":\"Into The Void\",\"url\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/\",\"sameAs\":[\"https:\\\/\\\/x.com\\\/kargig\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/author\\\/site-admin\\\/#author\",\"url\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/author\\\/site-admin\\\/\",\"name\":\"kargig\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/2005\\\/09\\\/13\\\/crude-script-for-sfv-checking\\\/#webpage\",\"url\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/2005\\\/09\\\/13\\\/crude-script-for-sfv-checking\\\/\",\"name\":\"crude script for sfv checking | Into.the.Void.\",\"description\":\"Most of the times, when I download something and there's an sfv file available I check the files against the sfv. That saves me from a lot of trouble later on... What I wanted though, was to have the sfv check program create a dir inside each folder it checks that would include the details\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/2005\\\/09\\\/13\\\/crude-script-for-sfv-checking\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/author\\\/site-admin\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/author\\\/site-admin\\\/#author\"},\"datePublished\":\"2005-09-13T17:42:35+03:00\",\"dateModified\":\"2005-10-12T01:38:07+03:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/\",\"name\":\"Into.the.Void.\",\"description\":\"Into The Void\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.void.gr\\\/kargig\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"crude script for sfv checking | Into.the.Void.","description":"Most of the times, when I download something and there's an sfv file available I check the files against the sfv. That saves me from a lot of trouble later on... What I wanted though, was to have the sfv check program create a dir inside each folder it checks that would include the details","canonical_url":"https:\/\/www.void.gr\/kargig\/blog\/2005\/09\/13\/crude-script-for-sfv-checking\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.void.gr\/kargig\/blog\/2005\/09\/13\/crude-script-for-sfv-checking\/#article","name":"crude script for sfv checking | Into.the.Void.","headline":"crude script for sfv checking","author":{"@id":"https:\/\/www.void.gr\/kargig\/blog\/author\/site-admin\/#author"},"publisher":{"@id":"https:\/\/www.void.gr\/kargig\/blog\/#organization"},"datePublished":"2005-09-13T17:42:35+03:00","dateModified":"2005-10-12T01:38:07+03:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.void.gr\/kargig\/blog\/2005\/09\/13\/crude-script-for-sfv-checking\/#webpage"},"isPartOf":{"@id":"https:\/\/www.void.gr\/kargig\/blog\/2005\/09\/13\/crude-script-for-sfv-checking\/#webpage"},"articleSection":"Linux"},{"@type":"BreadcrumbList","@id":"https:\/\/www.void.gr\/kargig\/blog\/2005\/09\/13\/crude-script-for-sfv-checking\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.void.gr\/kargig\/blog\/#listItem","position":1,"name":"Home","item":"https:\/\/www.void.gr\/kargig\/blog\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.void.gr\/kargig\/blog\/category\/linux\/#listItem","name":"Linux"}},{"@type":"ListItem","@id":"https:\/\/www.void.gr\/kargig\/blog\/category\/linux\/#listItem","position":2,"name":"Linux","item":"https:\/\/www.void.gr\/kargig\/blog\/category\/linux\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.void.gr\/kargig\/blog\/2005\/09\/13\/crude-script-for-sfv-checking\/#listItem","name":"crude script for sfv checking"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.void.gr\/kargig\/blog\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.void.gr\/kargig\/blog\/2005\/09\/13\/crude-script-for-sfv-checking\/#listItem","position":3,"name":"crude script for sfv checking","previousItem":{"@type":"ListItem","@id":"https:\/\/www.void.gr\/kargig\/blog\/category\/linux\/#listItem","name":"Linux"}}]},{"@type":"Organization","@id":"https:\/\/www.void.gr\/kargig\/blog\/#organization","name":"Into.the.Void.","description":"Into The Void","url":"https:\/\/www.void.gr\/kargig\/blog\/","sameAs":["https:\/\/x.com\/kargig"]},{"@type":"Person","@id":"https:\/\/www.void.gr\/kargig\/blog\/author\/site-admin\/#author","url":"https:\/\/www.void.gr\/kargig\/blog\/author\/site-admin\/","name":"kargig"},{"@type":"WebPage","@id":"https:\/\/www.void.gr\/kargig\/blog\/2005\/09\/13\/crude-script-for-sfv-checking\/#webpage","url":"https:\/\/www.void.gr\/kargig\/blog\/2005\/09\/13\/crude-script-for-sfv-checking\/","name":"crude script for sfv checking | Into.the.Void.","description":"Most of the times, when I download something and there's an sfv file available I check the files against the sfv. That saves me from a lot of trouble later on... What I wanted though, was to have the sfv check program create a dir inside each folder it checks that would include the details","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.void.gr\/kargig\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.void.gr\/kargig\/blog\/2005\/09\/13\/crude-script-for-sfv-checking\/#breadcrumblist"},"author":{"@id":"https:\/\/www.void.gr\/kargig\/blog\/author\/site-admin\/#author"},"creator":{"@id":"https:\/\/www.void.gr\/kargig\/blog\/author\/site-admin\/#author"},"datePublished":"2005-09-13T17:42:35+03:00","dateModified":"2005-10-12T01:38:07+03:00"},{"@type":"WebSite","@id":"https:\/\/www.void.gr\/kargig\/blog\/#website","url":"https:\/\/www.void.gr\/kargig\/blog\/","name":"Into.the.Void.","description":"Into The Void","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.void.gr\/kargig\/blog\/#organization"}}]}},"aioseo_meta_data":{"post_id":"147","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2022-01-04 12:02:20","updated":"2026-10-21 09:12:56","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.void.gr\/kargig\/blog\/\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.void.gr\/kargig\/blog\/category\/linux\/\" title=\"Linux\">Linux<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tcrude script for sfv checking\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.void.gr\/kargig\/blog\/"},{"label":"Linux","link":"https:\/\/www.void.gr\/kargig\/blog\/category\/linux\/"},{"label":"crude script for sfv checking","link":"https:\/\/www.void.gr\/kargig\/blog\/2005\/09\/13\/crude-script-for-sfv-checking\/"}],"views":3607,"_links":{"self":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/posts\/147","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/comments?post=147"}],"version-history":[{"count":0,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/posts\/147\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/media?parent=147"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/categories?post=147"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/tags?post=147"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}