Last active
June 13, 2018 16:01
-
-
Save LongYC/f19f5496bbc949569498 to your computer and use it in GitHub Desktop.
Change the creation and modification date of a file.
This file contains 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
# chmod 755 changedate.sh | |
# ./changedate.sh my_edited_photo.jpg 201504010000 | |
# $1 = filename. | |
# $2 = date in YYYYMMDDhhmm. | |
echo "Changing the creation date of file: $1 to date: $2" | |
touch -t $2 $1 . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment