# iterate through jpg files in current directory # and rename them to start with today's date for file in $( ls *.jpg ) do mv $file $(date +%F)-$file done