Close Menu
    Facebook X (Twitter) Instagram
    Command Linux
    • About
    • How to
      • Q&A
    • OS
      • Windows
      • Arch Linux
    • AI
    • Gaming
      • Easter Eggs
    • Statistics
    • Blog
      • Featured
    • MORE
      • IP Address
      • Man Pages
    • Write For Us
    • Contact
    Command Linux
    Home - man page - RENAME

    RENAME

    WillieBy WillieMarch 10, 2026Updated:March 10, 2026No Comments1 Min Read
     

    NAME

    rename – rename files  

    SYNOPSIS

    rename [options] expression replacement file…  

    DESCRIPTION

    rename will rename the specified files by replacing the first occurrence of expression in their name by replacement.  

    OPTIONS

    -v, –verbose
    Give visual feedback which files where renamed, if any.
    -V, –version
    Display version information and exit.
    -s, –symlink
    Peform rename on symlink target
    -h, –help
    Display help text and exit.
     

    EXAMPLES

    Given the files foo1, …, foo9, foo10, …, foo278, the commands

    rename foo foo0 foo?
    rename foo foo0 foo??
    

    will turn them into foo001, …, foo009, foo010, …, foo278. And

    rename .htm .html *.htm
    

    will fix the extension of your html files.  

    WARNING

    The renaming has no safeguards. If the user has permission to rewrite file names, the command will perform the action without any questions. For example, the result can be quite drastic when the command is run as root in the /lib directory. Always make a backup before running the command, unless you truly know what you are doing.  

    AVAILABILITY

    The rename command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/.

    Willie
    • Website

    Willie has over 15 years of experience in Linux system administration and DevOps. After managing infrastructure for startups and enterprises alike, he founded Command Linux to share the practical knowledge he wished he had when starting out. He oversees content strategy and contributes guides on server management, automation, and security.

    Related Posts

    OPENDIR

    April 21, 2026

    TAIL

    April 21, 2026

    OPERATOR

    April 21, 2026

    NANO

    April 21, 2026
    Top Posts

    SYSTEMD-NETWORKD.SERVICE

    March 2, 2026

    Google Zipper

    January 19, 2026

    Linux Boot Time Statistic (2026)

    February 24, 2026

    Using Blog SeveredBytes.net For IT Guidance and Tech Know-How

    January 22, 2026
    • Home
    • Contact Us
    • Privacy Policy
    • Terms of Use

    Type above and press Enter to search. Press Esc to cancel.