From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,97d724282c0c459e,start X-Google-Attributes: gidfee84,public From: "Tom Mc Carrick" Subject: Filename as date Date: 2000/05/17 Message-ID: <4ZlU4.25611$sB3.8724@news.indigo.ie>#1/1 X-Deja-AN: 624316251 X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 X-Complaints-To: abuse@eircom.net X-Trace: news.indigo.ie 958524352 159.134.226.227 (Wed, 17 May 2000 01:45:52 BST) Organization: Eircom.Net http://www.eircom.net X-MSMail-Priority: Normal NNTP-Posting-Date: Wed, 17 May 2000 01:45:52 BST Newsgroups: comp.unix.osf.osf1 I need to set up a daily entry in the root crontab file which will do a simple backup operation, copying a directory from one location to another. The trick is that the destination file will have the format 'DDMMYY' which is the date that it executes. I have tried a few methods, the nearest I got was (e.g. 'cp -R /usr/tmp /usr/tmp/`date +%A` ) which will name the destination file after the day e.g. 'Tuesday'. (The -R switch is to create a new directory) But I haven't got it in the required format (DDMMYY). Is there a better way to do this? Will it involve some sort of command substitution with `date` as above? Regards - Tom