{"id":1063,"date":"2015-02-19T10:11:38","date_gmt":"2015-02-19T08:11:38","guid":{"rendered":"http:\/\/www.shukko.com\/x3\/?p=1063"},"modified":"2015-02-19T10:14:50","modified_gmt":"2015-02-19T08:14:50","slug":"linux-recursuve-unrar","status":"publish","type":"post","link":"https:\/\/www.shukko.com\/x3\/2015\/02\/19\/linux-recursuve-unrar\/","title":{"rendered":"linux recursive unrar"},"content":{"rendered":"\n<pre class=\"lang:default decode:true \" >#!\/bin\/sh\r\n###\t\t ###\r\n# filename reunrar #\r\n###\t\t ###\r\nif [ -n \"$1\" ]; then\r\nfind $1 -iname *.rar | while read f\r\n        do\r\n                file=`basename \"$f\"`\r\n                dir=`dirname \"$f\"`\r\n\r\n                if [[ $file =~ .*part0*1\\.rar$ ]]; then\r\n\r\n                        echo \"$file to $dir\"\r\n                        nice -n 19 unrar e -o- -inul \"$f\" \"$dir\"\r\n\r\n                elif ! [[ $file =~ .*part[0-9]+\\.rar$ ]]; then\r\n\r\n                        echo \"$file to $dir\"\r\n                        nice -n 19 unrar e -o- -inul \"$f\" \"$dir\"\r\n                fi\r\n        done\r\nelse\r\necho \"reunrar [FILES DIR]\"\r\nfi<\/pre>\n<p>veya<\/p>\n<pre class=\"lang:default decode:true \" >#!\/bin\/bash\r\n\r\nif [ $# -ne 1 ]\r\nthen\r\n  echo \"U forgot to enter directory where i should work!\"\r\n  exit\r\nfi\r\n\r\nwhile \r\nmesg=\"\\n==============================================\\n\r\n  1.. Check .sfv files.\\n\r\n  2.. Unrar all files.\\n\r\n  3.. Delete rar and sfv files.\\n\r\n  4.. Exit\r\n  \\n==============================================\\n\r\nSelect: \\c\"\r\ndo\r\n  echo -e $mesg\r\n  read selection\r\n  case $selection in\r\n  1)\r\n    cd $1\r\n    cfv -r ;;\r\n  2)\r\n    for f in `find $1 -wholename *.r01`\r\n    do\r\n      echo \"Unpacking in directory: \"`dirname $f`\r\n      rar e -inul $f `dirname $f`\r\n    done ;;\r\n  3)\r\n    for g in `find $1 -wholename *.r01`\r\n    do \r\n      cd `dirname $g`\r\n      echo \"Deleting in directory: \"`dirname $g`\r\n      rm *.r?? *.url *.sfv imdb.nfo\r\n      rm -r Sample\/\r\n    done ;;\r\n  4) \r\n    exit;;\r\n  esac\r\ndone<\/pre>\n<p>kisaca<\/p>\n<pre class=\"lang:default decode:true \" >rar e -r -inul *.rar\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>#!\/bin\/sh ### ### # filename reunrar # ### ### if [ -n &#8220;$1&#8221; ]; then find $1 -iname *.rar | while read f do file=`basename &#8220;$f&#8221;` dir=`dirname &#8220;$f&#8221;` if [[ $file =~ .*part0*1\\.rar$ ]]; then echo &#8220;$file to $dir&#8221; nice -n 19 unrar e -o- -inul &#8220;$f&#8221; &#8220;$dir&#8221; elif ! [[ $file =~ .*part[0-9]+\\.rar$ ]]; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1063","post","type-post","status-publish","format-standard","hentry","category-kategerisiz"],"_links":{"self":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/1063","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/comments?post=1063"}],"version-history":[{"count":6,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/1063\/revisions"}],"predecessor-version":[{"id":1069,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/1063\/revisions\/1069"}],"wp:attachment":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/media?parent=1063"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/categories?post=1063"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/tags?post=1063"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}