Created
October 22, 2020 20:34
-
-
Save wendelnascimento/9f07dfaae7e89a3efac2752be73ab848 to your computer and use it in GitHub Desktop.
Rename all files in directory sequentially (preserving file original extension)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ls | cat -n | while read n f; do mv "$f" "new name${n}_new name$n.${f##*.}"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment