$ for f in *.m4a; do mv -n "$f" "$(date -r "$f" +"%Y-%m-%d_%H-%M-%S").m4a"; done
こんな感じになる
$ ls
2018-12-16_08-54-35.m4a 2018-12-16_09-04-59.m4a 2018-12-16_09-05-52.m4a
参考
更新2021-12-31
$ EXT=".md" $ for f in *$EXT; do echo "$(date -r "$f" +"%Y-%m-%d_%H-%M-%S")$EXT"; done # Check $ for f in *$EXT; do mv -n "$f" "$(date -r "$f" +"%Y-%m-%d_%H-%M-%S")$EXT"; done # Run rename $ ls -al