LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   adding timestamp to name (https://www.linuxquestions.org/questions/linux-general-1/adding-timestamp-to-name-122950/)

niehls 12-05-2003 09:06 AM

adding timestamp to name
 
was thinking of making a very easy backup thingy to backup a single directory.
i'll make a simple cron script like this

cp <directory> /mnt/hdd2/backup/ -R

now, my question is: is there any way of adding a timestamp to the destination name? like <dest.directory><current date> ?

acid_kewpie 12-05-2003 09:13 AM

just add `date format here, see manpage` INCLUDING backticks to the filename

niehls 12-05-2003 10:40 AM

thanks


All times are GMT -5. The time now is 06:16 PM.