Created
November 14, 2018 16:06
-
-
Save bhishanpdl/f19e9a263bea3c4758befb4648c7c767 to your computer and use it in GitHub Desktop.
Rename files sequentially in bash
This file contains hidden or 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
# rename files sequentially | |
num=0; for i in *; do mv "$i" "$(printf 'hello_%04d' $num).${i#*.}"; ((num++)); done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment