Skip to content

Instantly share code, notes, and snippets.

@flavioamieiro
Created September 9, 2012 02:36
Show Gist options
  • Save flavioamieiro/3682214 to your computer and use it in GitHub Desktop.
Save flavioamieiro/3682214 to your computer and use it in GitHub Desktop.
O Android organiza as fotos na galeria pela data de acesso do arquivo. Quando eu mudei o cartão SD, as fotos ficaram todas com a mesma data. Esse comando redefine a data de acesso do arquivo usando como base a data original da foto.
for FILE in `ls -1 *.jpg`;
do
touch -m -d "`exiftool -s3 -CreateDate "$FILE" -dateFormat "%Y-%m-%d %H:%M:%S"`" "$FILE"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment