[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How do I do this in bash ??



* Dave Selby <dave_arahan@yahoo.co.uk> [2003-01-19 12:10]:

> 
> #! /bin/sh
> 
> # Backup entire 'myfiles/' directory, name it with the date.
> 
> cd /usr/local/
> tar -czf /mnt/archive/autoarchive/date myfiles
> 
  tar czf <path_to_backup>/`date +%Y%m%d-%H%M`.backupmyfiles.tar.gz
  tar cjf <path_to_backup>/`date +%Y%m%d-%H%M`.backupmyfiles.tar.bz2
                           *                 *
                           note the inverted accents!

  results in                20030119-1213.backupmyfiles.tar.bz2
                           
  I would make use of the second form since the files get remarkably
  smaller!


wbr,
Lukas
-- 
Lukas Ruf
http://www.lpr.ch
Wanna know anything about raw ip? 
Join rawip@rawip.org on http://www.rawip.org



Reply to: