Skip to content

Instantly share code, notes, and snippets.

@fabioam
Last active August 30, 2016 01:42
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save fabioam/ca58f77d9693d1a89bcd1aa888c2cdd4 to your computer and use it in GitHub Desktop.
Localiza todas as imagens, e move para o diretório raiz incluindo um prefixo
find . -name '*.jpg' \
> | awk 'BEGIN{ a=0 }{ printf "mv \"%s\" %04d.jpg\n", $0, a++ }' \
> | bash
# fonte: http://stackoverflow.com/questions/3211595/renaming-files-in-a-folder-to-sequential-numbers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment