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

Re: quick tar question



On Saturday 30 March 2002 04:53 pm, you wrote:
> I'm trying to tar up the contents of an OpenBSD system and I wanted to
> know if there's a way to make tar skip a directory or a file
>
> For instance:
> > tar czfv /tmp/backup.tgz /
>
> I want to skip that /tmp directory so it doesn't spit out an error when
> it's finished.

Create a file called "exclude" that has a listing of the directories and/or 
files you don't want in your archive.  Then use gtar to create the tarball:
gtar  czvpfX  /tmp/backup.tgz  /path/to/exclude  /

-Ben
-- 
"The cost of living hasn't affected it's popularity." (Mark Twain)