Created
March 29, 2025 03:59
-
-
Save goooooouwa/afaf8f99c1a3419444a43e2e85a2f287 to your computer and use it in GitHub Desktop.
Batch rename files in directory with date modified timestamp as prefix of the filename
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
# ref: https://unix.stackexchange.com/questions/43338/renaming-a-bunch-of-files-with-date-modified-timestamp-at-the-end-of-the-filenam | |
for f in *; do mv -- "$f" "$(date +%Y-%m-%d -r $f)-$f"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment