← Back to team overview

sslug-teknik team mailing list archive

Re: Udelade under-underbibliotek i zip

 

On Sat, 13 Jan 2001 21:29:09 Morten Christensen wrote:
> Jeg laver backup'er med et script der aktiverer zip.
> Kommandoen ser sådan her ud:
> 
>   /usr/bin/zip -r \
>   /arkiv/bl_data \
>   /home/data/* -x@/root/bin/back/bl-bak-filer.lst
> 
> cd /home/data
>   /usr/bin/zip -r \
>   /arkiv/data  /home/data/*
> 
> Under /home/data er der ca. 40 biblioteker.
> Under hvert af disse kan der også være 40
> biblioteker. Herinde er måske et bibliotek
> som hedder "bak".
> 
> Indholdet i "bak" vil jeg undgå at få med i
> backup'en.
> 
> De forsøg, jeg har gjort ud fra "man zip's"
> -x parameter, er ikke lykkedes.
> 
> Nogen forslag til, hvordan jeg kan undgå at
> belaste backupen med bak'erne?

Jeg pakker lige et katalog med zip:
[kwv@tmp6 ~/supernaut/tmp]$ zip -r etc etc          
updating: etc/ (stored 0%)
updating: etc/httpd/ (stored 0%)
updating: etc/httpd/conf/ (stored 0%)
updating: etc/httpd/conf/httpd.conf (deflated 64%)
  adding: etc/httpd/symbion.png (deflated 1%)
[kwv@tmp6 ~/supernaut/tmp]$ unzip -l etc.zip 
Archive:  etc.zip
  Length     Date   Time    Name
 --------    ----   ----    ----
        0  04-23-00 21:59   etc/
        0  01-14-01 02:08   etc/httpd/
        0  04-23-00 21:59   etc/httpd/conf/
    33138  04-23-00 21:59   etc/httpd/conf/httpd.conf
     4366  01-14-01 02:08   etc/httpd/symbion.png
 --------                   -------
    37504                   5 files
[kwv@tmp6 ~/supernaut/tmp]$ rm etc.zip
[kwv@tmp6 ~/supernaut/tmp]$

Nu vil jeg gerne have mit zip arkiv uden png-filer:

[kwv@tmp6 ~/supernaut/tmp]$ zip -r etc etc -x \*.png
updating: etc/ (stored 0%)
updating: etc/httpd/ (stored 0%)
updating: etc/httpd/conf/ (stored 0%)
updating: etc/httpd/conf/httpd.conf (deflated 64%)
[kwv@tmp6 ~/supernaut/tmp]$ unzip -l etc.zip 
Archive:  etc.zip
  Length     Date   Time    Name
 --------    ----   ----    ----
        0  04-23-00 21:59   etc/
        0  01-14-01 02:08   etc/httpd/
        0  04-23-00 21:59   etc/httpd/conf/
    33138  04-23-00 21:59   etc/httpd/conf/httpd.conf
 --------                   -------
    33138                   4 files
[kwv@tmp6 ~/supernaut/tmp]$ 

Var det noget i den retning?

/kristian

-- 
Kristian Vilmann - kristian@xxxxxxxx
LinuxKonference i København: http://LinuxForum.dk/

Comparing the security of Linux with that of Microsoft Windows is not very 
instructive. Microsoft has done such a terrible job with security that it is
not really a fair comparison.
 - Bruce Schneier, Counterpane Internet Security, Inc.



Follow ups

References