[bash] renaming files with their last modification times
-r switch of date command is useful to achieve this : for i in *.avi; do mv $i “$(date -r $i ‘+%Y%m%d_%H%M%S’).avi”; done
-r switch of date command is useful to achieve this : for i in *.avi; do mv $i “$(date -r $i ‘+%Y%m%d_%H%M%S’).avi”; done