Rename – A Command Line Tool For Renaming Multiple Files in Linux

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Ravi Saive

I am Ravi Saive, creator of TecMint. A Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux. Follow Me: Twitter, Facebook and Google+

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

56 Responses

  1. George says:

    I am switching from windows. I would like to know if there is a way to do something like windows does: Select all files in a folder, right click on one of them, select rename, type something like “aaa” and press enter.

    There could be 2 files or 2,000, but lets say there were 5. The result would be 5 files named as such:
    This would save a lot of time.

  2. Richard H Busby says:

    Very excellent help with the rename command thanks a lot I’ve been struggling with this for a while

  3. Mahmood Shehab says:

    Thanks for your post!

    Please add other section to capitalize only first letter of each filename.

    # rename 's/\b(\w)/\U$1/g' *.ext
  4. Andrea says:

    How to rename single wrong characters in multiple file in a folder and sub-folder with a string command ?

  5. S. Prashanth says:


    I am trying to rename multiple files in Centos7.

    For example: File I have:


    I want to rename them to:


    How can I achieve this?

    Thank you!

  6. Pedro Diaz says:

    I’m running Linux kernel version 106100LC004 2.6.32-573.el6.x86_64 #1 SMP Wed Jul 1 18:23:37 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux. And, my ‘rename‘ command expressions are like this:

    # rename .html .php *.html

    I then made an alias to shorten this command.

    # ren () { rename "$1" "$2" *"$1"; }

    So now my version is:

    # ren .html .php

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.