Skip to content

Instantly share code, notes, and snippets.

@prethiee
Last active October 16, 2021 10:12
Show Gist options
  • Save prethiee/88849369d4fb497842372619c32dd2df to your computer and use it in GitHub Desktop.
Save prethiee/88849369d4fb497842372619c32dd2df to your computer and use it in GitHub Desktop.
linux-shell: renaming files to creation time
for f in *.jpg
do
mv -n "$f" "$(exiftool -d "%d-%b-%Y_%H:%M:%S" -CreateDate "$f" | awk '{print $4".jpg"}')"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment