Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: jean-paul Fermiger <ext.datavance.fermiger@aigf.sncf.fr>
Subject: Re: Filename as date
Date: 2000/05/17	[thread overview]
Message-ID: <39223537.B78CCE0@aigf.sncf.fr> (raw)
In-Reply-To: 4ZlU4.25611$sB3.8724@news.indigo.ie

Tom Mc Carrick wrote:

> 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

Try :  cp -R /usr/tmp /usr/tmp/`date +%d%m%y`

    Regards





  reply	other threads:[~2000-05-17  4:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-17  4:00 Filename as date Tom Mc Carrick
2000-05-17  4:00 ` jean-paul Fermiger [this message]
2000-05-17  4:00   ` Timo Felbinger
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox