{"id":107,"date":"2011-04-13T13:58:55","date_gmt":"2011-04-13T12:58:55","guid":{"rendered":"http:\/\/blog.campodoro.org\/?p=107"},"modified":"2011-04-13T14:01:00","modified_gmt":"2011-04-13T13:01:00","slug":"recursively-batch-rename-files-in-linux","status":"publish","type":"post","link":"https:\/\/blog.campodoro.org\/?p=107","title":{"rendered":"Recursively batch rename files in Linux"},"content":{"rendered":"<p>If you&#8217;re using Kerio Mail Server (Kerio Connect) under Linux and you&#8217;ve moved around (using rsync or such) some mail folders, sometimes you&#8217;ll need to recreate the folder index, otherwise some email might not show up in your email program (Outlook, Mail.app, Webmail).<br \/>\nThe only thing you&#8217;ll need to do is to rename the <strong>index.fld<\/strong> files inside each (!) folder into <strong>index.bad<\/strong>.<\/p>\n<p>Yeah, nasty. So: fire up your Vi editor and put this little script inside your store folder:<\/p>\n<pre>\r\n<strong>badindex.sh<\/strong><\/pre>\n<pre>#!\/bin\/bash\r\nfind . -name \"index.fld\" -exec sh -c 'mv -v \"$0\" \"${0%.fld}.bad\"' {} \\;\r\n\r\n<\/pre>\n<div class=\"tweetthis\" style=\"text-align:left;\"><p> <a class=\"tt\" href=\"http:\/\/twitter.com\/share?url=https:\/\/blog.campodoro.org\/?p=107&text=Recursively+batch+rename+files+in+Linux+%23campodoro+%23tips+%23apple&via=goudkamp&related=richardxthripp%2Ctweetthisplugin\" title=\"Twitter\"><img decoding=\"async\" class=\"nothumb\" src=\"http:\/\/blog.campodoro.org\/wp-content\/plugins\/tweet-this\/icons\/en\/twitter\/tt-twitter.png\" alt=\"Post to Twitter\" \/><\/a> <a class=\"tt\" href=\"http:\/\/twitter.com\/share?url=https:\/\/blog.campodoro.org\/?p=107&text=Recursively+batch+rename+files+in+Linux+%23campodoro+%23tips+%23apple&via=goudkamp&related=richardxthripp%2Ctweetthisplugin\" title=\"Twitter\">Tweet<\/a> <a class=\"tt\" href=\"http:\/\/delicious.com\/post?url=https:\/\/blog.campodoro.org\/?p=107&amp;title=Recursively+batch+rename+files+in+Linux\" title=\"Post to Delicious\"><img decoding=\"async\" class=\"nothumb\" src=\"http:\/\/blog.campodoro.org\/wp-content\/plugins\/tweet-this\/icons\/en\/delicious\/tt-delicious.png\" alt=\"Post to Delicious\" \/><\/a> <a class=\"tt\" href=\"http:\/\/delicious.com\/post?url=https:\/\/blog.campodoro.org\/?p=107&amp;title=Recursively+batch+rename+files+in+Linux\" title=\"Post to Delicious\">Post to Delicious<\/a> <a class=\"tt\" href=\"http:\/\/www.facebook.com\/share.php?u=https:\/\/blog.campodoro.org\/?p=107&amp;t=Recursively+batch+rename+files+in+Linux\" title=\"Post to Facebook\"><img decoding=\"async\" class=\"nothumb\" src=\"http:\/\/blog.campodoro.org\/wp-content\/plugins\/tweet-this\/icons\/en\/facebook\/tt-facebook.png\" alt=\"Post to Facebook\" \/><\/a> <a class=\"tt\" href=\"http:\/\/www.facebook.com\/share.php?u=https:\/\/blog.campodoro.org\/?p=107&amp;t=Recursively+batch+rename+files+in+Linux\" title=\"Post to Facebook\">Post to Facebook<\/a><\/p><\/div>","protected":false},"excerpt":{"rendered":"<p>If you&#8217;re using Kerio Mail Server (Kerio Connect) under Linux and you&#8217;ve moved around (using rsync or such) some mail folders, sometimes you&#8217;ll need to recreate the folder index, otherwise some email might not show up in your email program &hellip; <a href=\"https:\/\/blog.campodoro.org\/?p=107\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,8],"tags":[],"class_list":["post-107","post","type-post","status-publish","format-standard","hentry","category-linux","category-menu"],"_links":{"self":[{"href":"https:\/\/blog.campodoro.org\/index.php?rest_route=\/wp\/v2\/posts\/107"}],"collection":[{"href":"https:\/\/blog.campodoro.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.campodoro.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.campodoro.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.campodoro.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=107"}],"version-history":[{"count":2,"href":"https:\/\/blog.campodoro.org\/index.php?rest_route=\/wp\/v2\/posts\/107\/revisions"}],"predecessor-version":[{"id":110,"href":"https:\/\/blog.campodoro.org\/index.php?rest_route=\/wp\/v2\/posts\/107\/revisions\/110"}],"wp:attachment":[{"href":"https:\/\/blog.campodoro.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=107"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.campodoro.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=107"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.campodoro.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=107"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}