rename multiple files

Table of Contents



rename command

    rename searchWord replaceWord  <InputFile>

rename files using move command in for loop

    for file in File*.dat
    do
        mv -i "${file}" "${file/SearchWord/ReplacementWord}"
        # Here -i option will ask everytime for replacing name.
    done



Enjoy Reading This Article?

Here are some more articles you might like to read next:

  • sed command
  • Vi-Editor
  • find command
  • Grep command
  • GitLab workflow for CMS-AN
  • Condor Jobs
  • PPT with plots in one click
  • EOS uses
  • awk command
  • Mac Settings
  • Git CheatSheet