shrinking backup files

Sebastian M=?ISO-8859-1?B?/A==?=sch sebastian at
Tue Oct 4 21:23:08 UTC 2005


Once upon a time Ivan Guadalupe Terán Quijada wrote:

> Hello,
> How can I add the date into the backup filename???

Instead of using

tar czvf archive.tar.gz source

Use Shell-Substitution. For example ...

tar czvf archive_`date +%Y%m%d`.tar.gz source

The place between the `-quotes is substituted with the output of the command
within the quotes ... Today it would be 20051004. So the created file is


     _ :'_
   .`_`-'_`.     Sebastian Müsch
  :__|\ /|__:      sebastian at
  :__| S |__:
  :__|   |__:     iTunes ist aus :-(

More information about the ubuntu-users mailing list