Answers for "how to change file name with date in linux"

3

how to change date of file in linux

/*how to change date of file in linux*/
touch -a -m -t 201512180130.09 fileName.ext

-a = accessed
-m = modified
-t = timestamp - use [[CC]YY]MMDDhhmm[.ss] time format
Posted by: Guest on April-06-2021
0

bash rename files based on date modified

for f in *.jpg; do mv -n "$f" "$(date -r "$f" +"%Y%m%d_%H%M%S").jpg"; done
Posted by: Guest on October-30-2020

Code answers related to "how to change file name with date in linux"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language