{"id":9499,"date":"2005-09-26T17:46:29","date_gmt":"2005-09-26T14:46:29","guid":{"rendered":"https:\/\/mamchenkov.net\/wordpress\/2005\/09\/26\/recursively-renaming-files-in-linux\/"},"modified":"2008-12-08T00:56:30","modified_gmt":"2008-12-07T21:56:30","slug":"recursively-renaming-files-in-linux","status":"publish","type":"post","link":"https:\/\/mamchenkov.net\/wordpress\/2005\/09\/26\/recursively-renaming-files-in-linux\/","title":{"rendered":"Recursively renaming files in Linux"},"content":{"rendered":"<!-- google_ad_section_start -->\n<p>One thing I liked about Linux is it&#8217;s hidden simplicity.  When in a hurry, I usually go for the first working solution of a given problem.  If the same problem  appears often, I can get used to the first solution so much that I don&#8217;t even think about simplifying it.<\/p>\n<p><!--more--><\/p>\n<p>A good example of this scenario is recursive renaming of files.  It doesn&#8217;t happen that often though, but when it does, I am usually in a hurry and use the same old solution that I came across years ago.  Here is how I am used to do it:<\/p>\n<pre>[me@here dir]$ #Recursively rename some to other\r\n[me@here dir]$ for FILE in `find . -name somefile`\r\n[me@here dir]&gt; do\r\n[me@here dir]&gt; NEW=`echo $FILE | sed -e 's\/some\/other\/'`\r\n[me@here dir]&gt; mv \"$FILE\" \"$NEW\"\r\n[me@here dir]&gt; done<\/pre>\n<p>Note that this is more of the base solution.  Sometimes I have more parameters to <code>find<\/code>.  Like when I don&#8217;t use <code>sed<\/code> at all and just use the <code>-exec mv<\/code> syntax.  Sometimes I go as far as write a Perl script.<\/p>\n<p>Obviously, this solution is very ineffecient and overdesigned.  But it always worked for me.<\/p>\n<p>Today I had to recursively rename a bunch of files and for once I wasn&#8217;t in a hurry.  While I was slowly enterting in the characters and made a typing mistake, it occured to me that I am overdoing something.  So I stopped and made a miniresearch.  I spent much less than two minutes on finding a simplier and much nicer way of doing the same.<\/p>\n<p>Apparently, there is a standard utility <code>rename<\/code>.  It can change the name of the file fully or partially.    It needs two parameters &#8211; what to change and to what to change it &#8211; and a list of file to work with.  Here is how it can be used to solve the problem above:<\/p>\n<pre>[me@here dir]$ # Recursively rename some to other\r\n[me@here dir]$ rename some other `find . -name some`<\/pre>\n<p>Now that&#8217;s the beauty, isn&#8217;t it?  It makes me think of all those characters I lost over the years&#8230;<\/p>\n<p><ins datetime=\"2005-09-26T15:22:10+00:00\">Update<\/ins>: edited heavily to remove some nonsense that I typed for no good reason.<\/p>\n<!-- google_ad_section_end -->\n","protected":false},"excerpt":{"rendered":"<!-- google_ad_section_start -->\n<p>One thing I liked about Linux is it&#8217;s hidden simplicity. When in a hurry, I usually go for the first working solution of a given problem. If the same problem appears often, I can get used to the first solution so much that I don&#8217;t even think about simplifying it.<\/p>\n<!-- google_ad_section_end -->\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false,"_links_to":"","_links_to_target":""},"categories":[1,6,18],"tags":[1960,616,1531,74],"keyring_services":[],"class_list":["post-9499","post","type-post","status-publish","format-standard","hentry","category-general","category-linux","category-programming","tag-command-line","tag-filesystem","tag-operating-systems","tag-tips"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.8 - aioseo.com -->\n\t<meta name=\"description\" content=\"One thing I liked about Linux is it&#039;s hidden simplicity. When in a hurry, I usually go for the first working solution of a given problem. If the same problem appears often, I can get used to the first solution so much that I don&#039;t even think about simplifying it. A good example of this\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Leonid Mamchenkov\"\/>\n\t<meta name=\"google-site-verification\" content=\"VHvdD0_usx1_4DzKy_QCVcICVgX2EgA2ybELT-wl7kQ\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/mamchenkov.net\/wordpress\/2005\/09\/26\/recursively-renaming-files-in-linux\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.8\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Leonid Mamchenkov - Life, universe, and everything else\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Recursively renaming files in Linux - Leonid Mamchenkov\" \/>\n\t\t<meta property=\"og:description\" content=\"One thing I liked about Linux is it&#039;s hidden simplicity. When in a hurry, I usually go for the first working solution of a given problem. If the same problem appears often, I can get used to the first solution so much that I don&#039;t even think about simplifying it. A good example of this\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/mamchenkov.net\/wordpress\/2005\/09\/26\/recursively-renaming-files-in-linux\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2026\/03\/leonid-sailing-beer.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2026\/03\/leonid-sailing-beer.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t\t<meta property=\"og:image:height\" content=\"1024\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2005-09-26T14:46:29+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2008-12-07T21:56:30+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/MamchenkovBlog\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@mamchenkov\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Recursively renaming files in Linux - Leonid Mamchenkov\" \/>\n\t\t<meta name=\"twitter:description\" content=\"One thing I liked about Linux is it&#039;s hidden simplicity. When in a hurry, I usually go for the first working solution of a given problem. If the same problem appears often, I can get used to the first solution so much that I don&#039;t even think about simplifying it. A good example of this\" \/>\n\t\t<meta name=\"twitter:creator\" content=\"@mamchenkov\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2026\/03\/leonid-sailing-beer.jpg\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/2005\\\/09\\\/26\\\/recursively-renaming-files-in-linux\\\/#blogposting\",\"name\":\"Recursively renaming files in Linux - Leonid Mamchenkov\",\"headline\":\"Recursively renaming files in Linux\",\"author\":{\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/author\\\/leonid\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/2005\\\/09\\\/26\\\/recursively-renaming-files-in-linux\\\/#articleImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3cf6df002a284d78fb6e9d8222ca4d102e0832035ed6bc8447008bd234e131a4?s=96&d=identicon&r=g\",\"width\":96,\"height\":96,\"caption\":\"Leonid Mamchenkov\"},\"datePublished\":\"2005-09-26T17:46:29+02:00\",\"dateModified\":\"2008-12-08T00:56:30+02:00\",\"inLanguage\":\"en-US\",\"commentCount\":12,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/2005\\\/09\\\/26\\\/recursively-renaming-files-in-linux\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/2005\\\/09\\\/26\\\/recursively-renaming-files-in-linux\\\/#webpage\"},\"articleSection\":\"All, Linux, Programming, command line, filesystem, operating systems, tips\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/2005\\\/09\\\/26\\\/recursively-renaming-files-in-linux\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/category\\\/technology\\\/#listItem\",\"position\":2,\"name\":\"Technology\",\"item\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/category\\\/technology\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/category\\\/technology\\\/linux\\\/#listItem\",\"name\":\"Linux\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/category\\\/technology\\\/linux\\\/#listItem\",\"position\":3,\"name\":\"Linux\",\"item\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/category\\\/technology\\\/linux\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/2005\\\/09\\\/26\\\/recursively-renaming-files-in-linux\\\/#listItem\",\"name\":\"Recursively renaming files in Linux\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/2005\\\/09\\\/26\\\/recursively-renaming-files-in-linux\\\/#listItem\",\"position\":4,\"name\":\"Recursively renaming files in Linux\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/category\\\/technology\\\/linux\\\/#listItem\",\"name\":\"Linux\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/#person\",\"name\":\"Leonid Mamchenkov\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/2005\\\/09\\\/26\\\/recursively-renaming-files-in-linux\\\/#personImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3cf6df002a284d78fb6e9d8222ca4d102e0832035ed6bc8447008bd234e131a4?s=96&d=identicon&r=g\",\"width\":96,\"height\":96,\"caption\":\"Leonid Mamchenkov\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/author\\\/leonid\\\/#author\",\"url\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/author\\\/leonid\\\/\",\"name\":\"Leonid Mamchenkov\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/2005\\\/09\\\/26\\\/recursively-renaming-files-in-linux\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3cf6df002a284d78fb6e9d8222ca4d102e0832035ed6bc8447008bd234e131a4?s=96&d=identicon&r=g\",\"width\":96,\"height\":96,\"caption\":\"Leonid Mamchenkov\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/2005\\\/09\\\/26\\\/recursively-renaming-files-in-linux\\\/#webpage\",\"url\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/2005\\\/09\\\/26\\\/recursively-renaming-files-in-linux\\\/\",\"name\":\"Recursively renaming files in Linux - Leonid Mamchenkov\",\"description\":\"One thing I liked about Linux is it's hidden simplicity. When in a hurry, I usually go for the first working solution of a given problem. If the same problem appears often, I can get used to the first solution so much that I don't even think about simplifying it. A good example of this\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/2005\\\/09\\\/26\\\/recursively-renaming-files-in-linux\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/author\\\/leonid\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/author\\\/leonid\\\/#author\"},\"datePublished\":\"2005-09-26T17:46:29+02:00\",\"dateModified\":\"2008-12-08T00:56:30+02:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/#website\",\"url\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/\",\"name\":\"Blog of Leonid Mamchenkov\",\"description\":\"Life, universe, and everything else\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Recursively renaming files in Linux - Leonid Mamchenkov","description":"One thing I liked about Linux is it's hidden simplicity. When in a hurry, I usually go for the first working solution of a given problem. If the same problem appears often, I can get used to the first solution so much that I don't even think about simplifying it. A good example of this","canonical_url":"https:\/\/mamchenkov.net\/wordpress\/2005\/09\/26\/recursively-renaming-files-in-linux\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"google-site-verification":"VHvdD0_usx1_4DzKy_QCVcICVgX2EgA2ybELT-wl7kQ","miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/mamchenkov.net\/wordpress\/2005\/09\/26\/recursively-renaming-files-in-linux\/#blogposting","name":"Recursively renaming files in Linux - Leonid Mamchenkov","headline":"Recursively renaming files in Linux","author":{"@id":"https:\/\/mamchenkov.net\/wordpress\/author\/leonid\/#author"},"publisher":{"@id":"https:\/\/mamchenkov.net\/wordpress\/#person"},"image":{"@type":"ImageObject","@id":"https:\/\/mamchenkov.net\/wordpress\/2005\/09\/26\/recursively-renaming-files-in-linux\/#articleImage","url":"https:\/\/secure.gravatar.com\/avatar\/3cf6df002a284d78fb6e9d8222ca4d102e0832035ed6bc8447008bd234e131a4?s=96&d=identicon&r=g","width":96,"height":96,"caption":"Leonid Mamchenkov"},"datePublished":"2005-09-26T17:46:29+02:00","dateModified":"2008-12-08T00:56:30+02:00","inLanguage":"en-US","commentCount":12,"mainEntityOfPage":{"@id":"https:\/\/mamchenkov.net\/wordpress\/2005\/09\/26\/recursively-renaming-files-in-linux\/#webpage"},"isPartOf":{"@id":"https:\/\/mamchenkov.net\/wordpress\/2005\/09\/26\/recursively-renaming-files-in-linux\/#webpage"},"articleSection":"All, Linux, Programming, command line, filesystem, operating systems, tips"},{"@type":"BreadcrumbList","@id":"https:\/\/mamchenkov.net\/wordpress\/2005\/09\/26\/recursively-renaming-files-in-linux\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/mamchenkov.net\/wordpress#listItem","position":1,"name":"Home","item":"https:\/\/mamchenkov.net\/wordpress","nextItem":{"@type":"ListItem","@id":"https:\/\/mamchenkov.net\/wordpress\/category\/technology\/#listItem","name":"Technology"}},{"@type":"ListItem","@id":"https:\/\/mamchenkov.net\/wordpress\/category\/technology\/#listItem","position":2,"name":"Technology","item":"https:\/\/mamchenkov.net\/wordpress\/category\/technology\/","nextItem":{"@type":"ListItem","@id":"https:\/\/mamchenkov.net\/wordpress\/category\/technology\/linux\/#listItem","name":"Linux"},"previousItem":{"@type":"ListItem","@id":"https:\/\/mamchenkov.net\/wordpress#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/mamchenkov.net\/wordpress\/category\/technology\/linux\/#listItem","position":3,"name":"Linux","item":"https:\/\/mamchenkov.net\/wordpress\/category\/technology\/linux\/","nextItem":{"@type":"ListItem","@id":"https:\/\/mamchenkov.net\/wordpress\/2005\/09\/26\/recursively-renaming-files-in-linux\/#listItem","name":"Recursively renaming files in Linux"},"previousItem":{"@type":"ListItem","@id":"https:\/\/mamchenkov.net\/wordpress\/category\/technology\/#listItem","name":"Technology"}},{"@type":"ListItem","@id":"https:\/\/mamchenkov.net\/wordpress\/2005\/09\/26\/recursively-renaming-files-in-linux\/#listItem","position":4,"name":"Recursively renaming files in Linux","previousItem":{"@type":"ListItem","@id":"https:\/\/mamchenkov.net\/wordpress\/category\/technology\/linux\/#listItem","name":"Linux"}}]},{"@type":"Person","@id":"https:\/\/mamchenkov.net\/wordpress\/#person","name":"Leonid Mamchenkov","image":{"@type":"ImageObject","@id":"https:\/\/mamchenkov.net\/wordpress\/2005\/09\/26\/recursively-renaming-files-in-linux\/#personImage","url":"https:\/\/secure.gravatar.com\/avatar\/3cf6df002a284d78fb6e9d8222ca4d102e0832035ed6bc8447008bd234e131a4?s=96&d=identicon&r=g","width":96,"height":96,"caption":"Leonid Mamchenkov"}},{"@type":"Person","@id":"https:\/\/mamchenkov.net\/wordpress\/author\/leonid\/#author","url":"https:\/\/mamchenkov.net\/wordpress\/author\/leonid\/","name":"Leonid Mamchenkov","image":{"@type":"ImageObject","@id":"https:\/\/mamchenkov.net\/wordpress\/2005\/09\/26\/recursively-renaming-files-in-linux\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/3cf6df002a284d78fb6e9d8222ca4d102e0832035ed6bc8447008bd234e131a4?s=96&d=identicon&r=g","width":96,"height":96,"caption":"Leonid Mamchenkov"}},{"@type":"WebPage","@id":"https:\/\/mamchenkov.net\/wordpress\/2005\/09\/26\/recursively-renaming-files-in-linux\/#webpage","url":"https:\/\/mamchenkov.net\/wordpress\/2005\/09\/26\/recursively-renaming-files-in-linux\/","name":"Recursively renaming files in Linux - Leonid Mamchenkov","description":"One thing I liked about Linux is it's hidden simplicity. When in a hurry, I usually go for the first working solution of a given problem. If the same problem appears often, I can get used to the first solution so much that I don't even think about simplifying it. A good example of this","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/mamchenkov.net\/wordpress\/#website"},"breadcrumb":{"@id":"https:\/\/mamchenkov.net\/wordpress\/2005\/09\/26\/recursively-renaming-files-in-linux\/#breadcrumblist"},"author":{"@id":"https:\/\/mamchenkov.net\/wordpress\/author\/leonid\/#author"},"creator":{"@id":"https:\/\/mamchenkov.net\/wordpress\/author\/leonid\/#author"},"datePublished":"2005-09-26T17:46:29+02:00","dateModified":"2008-12-08T00:56:30+02:00"},{"@type":"WebSite","@id":"https:\/\/mamchenkov.net\/wordpress\/#website","url":"https:\/\/mamchenkov.net\/wordpress\/","name":"Blog of Leonid Mamchenkov","description":"Life, universe, and everything else","inLanguage":"en-US","publisher":{"@id":"https:\/\/mamchenkov.net\/wordpress\/#person"}}]},"og:locale":"en_US","og:site_name":"Leonid Mamchenkov - Life, universe, and everything else","og:type":"article","og:title":"Recursively renaming files in Linux - Leonid Mamchenkov","og:description":"One thing I liked about Linux is it's hidden simplicity. When in a hurry, I usually go for the first working solution of a given problem. If the same problem appears often, I can get used to the first solution so much that I don't even think about simplifying it. A good example of this","og:url":"https:\/\/mamchenkov.net\/wordpress\/2005\/09\/26\/recursively-renaming-files-in-linux\/","og:image":"https:\/\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2026\/03\/leonid-sailing-beer.jpg","og:image:secure_url":"https:\/\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2026\/03\/leonid-sailing-beer.jpg","og:image:width":1024,"og:image:height":1024,"article:published_time":"2005-09-26T14:46:29+00:00","article:modified_time":"2008-12-07T21:56:30+00:00","article:publisher":"https:\/\/www.facebook.com\/MamchenkovBlog","twitter:card":"summary_large_image","twitter:site":"@mamchenkov","twitter:title":"Recursively renaming files in Linux - Leonid Mamchenkov","twitter:description":"One thing I liked about Linux is it's hidden simplicity. When in a hurry, I usually go for the first working solution of a given problem. If the same problem appears often, I can get used to the first solution so much that I don't even think about simplifying it. A good example of this","twitter:creator":"@mamchenkov","twitter:image":"https:\/\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2026\/03\/leonid-sailing-beer.jpg"},"aioseo_meta_data":{"post_id":"9499","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":"","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,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2023-07-19 18:32:42","updated":"2026-01-15 00:51:44","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/mamchenkov.net\/wordpress\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/mamchenkov.net\/wordpress\/category\/technology\/\" title=\"Technology\">Technology<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/mamchenkov.net\/wordpress\/category\/technology\/linux\/\" title=\"Linux\">Linux<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tRecursively renaming files in Linux\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/mamchenkov.net\/wordpress"},{"label":"Technology","link":"https:\/\/mamchenkov.net\/wordpress\/category\/technology\/"},{"label":"Linux","link":"https:\/\/mamchenkov.net\/wordpress\/category\/technology\/linux\/"},{"label":"Recursively renaming files in Linux","link":"https:\/\/mamchenkov.net\/wordpress\/2005\/09\/26\/recursively-renaming-files-in-linux\/"}],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":9488,"url":"https:\/\/mamchenkov.net\/wordpress\/2005\/09\/23\/finding-files-in-linux\/","url_meta":{"origin":9499,"position":0},"title":"Finding files in Linux","author":"Leonid Mamchenkov","date":"September 23, 2005","format":false,"excerpt":"Many beginning Linux users experience difficulties getting used to the filesystem structure. Indeed, there are many files and directories, the structure of which are not as obvious as it could be. Choosing an appropriate location for a new file or directory is difficult and many choose to follow their own\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":9038,"url":"https:\/\/mamchenkov.net\/wordpress\/2005\/06\/03\/recursively-adding-files-and-directories-in-gnu-arch\/","url_meta":{"origin":9499,"position":1},"title":"Recursively adding files and directories in Gnu Arch","author":"Leonid Mamchenkov","date":"June 3, 2005","format":false,"excerpt":"One of the little annoyances of Gnu Arch is that it does not add files and directories recursively. Not to worry, though. Here is a little shell script that can assist with that task: #!\/bin\/bash # Find all files and directories, skipping .\/{arch} for FILE in `find . -path '.\/{arch}'\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":8009,"url":"https:\/\/mamchenkov.net\/wordpress\/2004\/10\/06\/copying-files-to-remote-destinations-with-bells-and-whistles\/","url_meta":{"origin":9499,"position":2},"title":"Copying files to remote destinations.  With bells and whistles.","author":"Leonid Mamchenkov","date":"October 6, 2004","format":false,"excerpt":"If you ever had to copy a file from one machine to another over a network, chances are you know more than one way to do it by now. Especially if you were doing it on some Unix machine. If you are still struggling, here is a short list to\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":9527,"url":"https:\/\/mamchenkov.net\/wordpress\/2005\/10\/05\/making-thumbnails-for-movies-with-ffmpeg\/","url_meta":{"origin":9499,"position":3},"title":"Making thumbnails for movies with ffmpeg","author":"Leonid Mamchenkov","date":"October 5, 2005","format":false,"excerpt":"I am slowly publishing our movie clips to my gallery. Gallery software has an excellent ffmpeg plugin that automatically creates thumbnails for movies so that it is very easy to see what is what. The only shortcoming it has is that it is not possible pick the frame from the\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":11615,"url":"https:\/\/mamchenkov.net\/wordpress\/2009\/07\/02\/running-simultaneous-firefox-sessions-with-different-profiles\/","url_meta":{"origin":9499,"position":4},"title":"Running simultaneous Firefox sessions with different profiles","author":"Leonid Mamchenkov","date":"July 2, 2009","format":false,"excerpt":"The more and more I use Firefox, the more add-ons I install, and the heavier it becomes.\u00a0 Recently I got to the point where I am annoyed by all the heavy weight functionality, but cannot remove it complete because I need it occasionally. The solution to my problem turned out\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":26910,"url":"https:\/\/mamchenkov.net\/wordpress\/2016\/11\/20\/automate-openvpn-client-on-centos-7\/","url_meta":{"origin":9499,"position":5},"title":"Automate OpenVPN client on CentOS 7","author":"Leonid Mamchenkov","date":"November 20, 2016","format":false,"excerpt":"I need to setup OpenVPN client to start automatically on a CentOS 7 server for one of our recent projects at work. \u00a0I'm not well versed in VPN technology, but the majority of the time was spent on something that I didn't expect. I go the VPN configuration and all\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/9499","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/comments?post=9499"}],"version-history":[{"count":0,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/9499\/revisions"}],"wp:attachment":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/media?parent=9499"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/categories?post=9499"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/tags?post=9499"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/keyring_services?post=9499"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}