linux shell: adding date to file name

simple way to add the date to the start of a file for archiving etc..

cp test.txt backup/`date +%Y%m%d`.test.txt

Justin Kelly

Justin Kelly

Web Developer, Business Analytics, Data Engineer specialising in PHP, ReactJS, Tableau, AWS RedShift and Matillion ETL

Based in Melbourne, Australia

Feel free to contact me or _justin_kelly

Leave a comment

Name Notify me of replies by email.