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 justin@kelly.org.au or _justin_kelly

Leave a comment

Name Notify me of replies by email.