Created
November 7, 2019 15:40
-
-
Save j0hj0h/eafd4442d212f619b1bd2770b600f0d0 to your computer and use it in GitHub Desktop.
Write file modification time to 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
for file in *.csv; do | |
new_name=$(date -r $file "+%Y%m%d-%H%M%S").csv | |
echo "renaming $file to $new_name" | |
mv $file $new_name | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment