[KLUG Members] script getting date variable

Buist Justin members@kalamazoolinux.org
Wed, 21 Aug 2002 16:17:22 -0400


> FILENAME=$(date +%s)
> ... some bash code ...
> tar rpPf /backup/${FILENAME}\.tar
> 
> And that's the idea. Hope that's somewhat useful. BTW, that 
> date will return 
> in UNIX time, which, as far as I know, is always unique.

Close enough to unique for backup purposes... it's actually the number of seconds since the Epoch (Jan 1, 1970 12:00AM).

Justin Buist