From owner-freebsd-questions Thu Jun 14 0:46:19 2001 Delivered-To: freebsd-questions@freebsd.org Received: from cqos1.cqos.com (ppp-64-160-241-125.cqos.com [64.160.241.125]) by hub.freebsd.org (Postfix) with ESMTP id AB79A37B413 for ; Thu, 14 Jun 2001 00:46:08 -0700 (PDT) (envelope-from Sknox@CQOS.COM) Received: by CQOS1 with Internet Mail Service (5.5.2448.0) id ; Thu, 14 Jun 2001 00:46:08 -0700 Message-ID: <550B4D6FA776D3118D1D00902799170C6086B4@CQOS1> From: Sean Knox To: "FreeBSD Questions (E-mail)" Subject: RE: Excluding directories/files with GNU tar. Date: Thu, 14 Jun 2001 00:46:02 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Content-Type: text/plain; charset="iso-8859-1" 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 Many thanks to Mario Doria, who suggested the following: "try inverting the order from: tar -cvvf var.tar /var -X /home/sean/nobackup to tar -cvvf var.tar -X /home/sean/nobackup /var" In the /home/sean/nobackup file, i had entries such as: /var/db /var/qmail Worked great. Thanks again Mario! - Sean -----Original Message----- From: Sean Knox [mailto:Sknox@CQOS.COM] Sent: Wednesday, June 13, 2001 11:54 PM To: FreeBSD Questions (E-mail) Subject: Excluding directories/files with GNU tar. I have searched for quite awhile in my attempts to exclude certain directories when creating a tar. to tar the entire /var directory, minus the entire /var/db directory (and any subdirectories) as well as /var/tmp, I have tried the following: ---> tar cvf var.tar /var --exclude db --exclude tmp and I also tried: ----> tar -cvvf var.tar /var -X /home/sean/nobackup and created a file named "nobackup" beforehand that contains the files and/or directories to be excluded: /var/db/* /var/tmp/* Neither of these solutions worked. What am I doing wrong? - Sean To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message