Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Jun 2001 00:46:02 -0700
From:      Sean Knox <Sknox@CQOS.COM>
To:        "FreeBSD Questions (E-mail)" <FreeBSD-questions@FreeBSD.ORG>
Subject:   RE: Excluding directories/files with GNU tar.
Message-ID:  <550B4D6FA776D3118D1D00902799170C6086B4@CQOS1>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?550B4D6FA776D3118D1D00902799170C6086B4>