LinuxSA Mailing list archives
Index:
[thread]
[date]
[subject]
[author]
From: Gary Hawkins <ghawk@eskimo.com>
To : Nick Stock" <nstock@netstarnetworks.com>, <nstock@netstarnetworks.com>
Date: Sun, 20 Feb 2000 17:19:50 -0800
RE: Date stamp
cp file backup-`date +%y%m%d`.tgz
Field Descriptors:
n insert a new-line character
t insert a tab character
m month of year - 01 to 12
d day of month - 01 to 31
y last 2 digits of year - 00 to 99
D date as mm/dd/yy
H hour - 00 to 23
M minute - 00 to 59
S second - 00 to 59
T time as HH:MM:SS
j day of year - 001 to 366
w day of week - Sunday = 0
> -----Original Message-----
> From: Nick Stock [mailto:nstock@netstarnetworks.com]
> Sent: Sunday, February 20, 2000 5:35 PM
> To: linuxsa@linuxsa.org.au
> Subject: Date stamp
>
>
> Hi all,
>
> I am trying to use a shell script (via cron) to create a backup file
> every day and I would like the filename to contain the date.
>
> Something along the lines of... backup-000221.tgz
>
> How can I go about this?
> Does anyone know of any good examples on how to do this.
> My shell programming experience is limited.
>
> Thanks,
>
> Nick
> RJ-45 of all trades.
>
> --
> LinuxSA WWW: http://www.linuxsa.org.au/ IRC: #linuxsa on irc.linux.org.au
> To unsubscribe from the LinuxSA list:
> mail linuxsa-request@linuxsa.org.au with "unsubscribe" as the subject
>
--
LinuxSA WWW: http://www.linuxsa.org.au/ IRC: #linuxsa on irc.linux.org.au
To unsubscribe from the LinuxSA list:
mail linuxsa-request@linuxsa.org.au with "unsubscribe" as the subject
Index:
[thread]
[date]
[subject]
[author]
Return to the LinuxSA Mailing List Information Page