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 and Tableau

Based in Melbourne, Australia

Feel free to contact me or _justin_kelly

Leave a comment

Notify me of replies by email.