Renaming and Moving Files

Given a directory with multiple subdirectories containing files named 1.txt, 2.txt, etc.

  • Rename all files 1.txt to a.txt

    find . -type f -name "1.txt" -execdir rename 1.txt a.txt {} \;