#!/bin/sh for f in *.png do echo mv -n "$f" "$(date +%Y%m%d-%H-%M-%S)_$f" done So I want to rename several filefiles with their timecreated liketimestamp as stated in (ls -lt --full-timels -lt --full-time), but I run when my code above, the name useuses the current date/time or modify time. Only year,month,day I want the year, month, and day in yymmdd format.