Skip to navigation

Gustavo Saiani

Gustavo Saiani

Software, finance, books, painting, psychology, cycling

  • Home
  • Return to Content

June 17, 2015

Renaming files recursively in terminal

Wanted to rename all my files ending in .html.slim to .slim, in several subfolders.

for file in $(find . -iname ‘*.html.slim’)
do
mv $file $(echo “$file” | sed -r ‘s|.html.slim|.slim|g’)
done

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)

Related

  • Software
  • Comments Off on Renaming files recursively in terminal
  • gusaiani

Post navigation

Deploying to Dreampress – note to self
Moccato

Recent Posts

  • (no title)
  • Carta da Parceria de Investimentos — 2024
  • Fogueira
  • Carta da Parceria de Investimentos — 2023
  • Italy Divide 2022 — Terra Santa

Archives

  • 2025
  • 2024
  • 2023
  • 2022
  • 2021
  • 2020
  • 2019
  • 2018
  • 2017
  • 2016
  • 2015

Categories

  • Books
  • Cycling
  • Elixir
  • Entrepreneurship
  • Finance
  • Graphic Design
  • Investing
  • Javascript
  • Management
  • My Year In…
  • Painting
  • Phoenix
  • Poemas
  • Productivity
  • Psychology
  • React.js
  • Recruiting
  • Ruby on Rails
  • Shell
  • Software
  • Webpack

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy