From owner-freebsd-questions Wed Sep 5 14:56:15 2001 Delivered-To: freebsd-questions@freebsd.org Received: from stargate.clickcom.com (stargate.clickcom.com [209.198.22.4]) by hub.freebsd.org (Postfix) with ESMTP id CDEBA37B406 for ; Wed, 5 Sep 2001 14:56:07 -0700 (PDT) Received: from fishbowl (dhcp-1.clt.clickcom.com [209.198.22.65]) by stargate.clickcom.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id R055DXLZ; Wed, 5 Sep 2001 17:56:18 -0400 Reply-To: From: "John Straiton" To: Subject: Problem with the Exclude option of tar Date: Wed, 5 Sep 2001 17:55:13 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG tar is teasing me. here's my situation: I'd like to tar.gz all the /home directories on my machine every night, into separate files (for easy restoration), however there are of course some files that I don't want copied into the tar. Lets use the file quota.users for example. I would like to use the exclude-file option of tar but here's the problem tar czfX testfile.tar.gz excluded.files /home with excluded.files simply having the line "home/quota.user" in it works fine, but tar czfX testfile.tar.gz excluded.files /home/* does not. Nor does it work with an exclude file that says: home/quota.user quota.user *.user /home/quota.user ./quota.user Which is giving me grief because my script reads like: for i in `ls /home` do tar czfX /backup-directory-structure/$i.tar.gz excluded.files /home/$i done Now I know that I could simply tell the .sh script to exclude that file, but the proper way to do it would be with tar's exclude option since it scales better. Ideas? John Straiton - ClickCom, Inc. jks@clickcom.com - (704)365-9970x101 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message