On Wed, Sep 10, 2003 at 12:28:17PM -0700, john jonas wrote:
> #!/bin/bash
> tar -czf /backups/code_backup-[todays date].tar.gz
> /some directory

You may want to try something like this:
#!/bin/bash
tar czf /backups/code_backup-`date +"%Y-%m-%d"`.tar.gz /directory

This would create a file called /backups/code_backup-2003-09-10.tar.gz
if it were run today.  Check the man page for date if you want another
format.

-- 
--------------------------------+-----------------------------------
Byron Clark                     |       http://www.byronandannie.net
[EMAIL PROTECTED]         | 
--------------------------------+-----------------------------------
GnuPG Fingerprint: 0365 6979 6C3E BC0C 56C0 FB7F 12B3 75DD 042B EA68

Attachment: pgp00000.pgp
Description: PGP signature

____________________
BYU Unix Users Group 
http://uug.byu.edu/ 
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to