How to exlude few unwanted files or directories while taring.
I am using solaris8 and the tar am using is not a GNU.
I tried
tar -cvf file.tar -X directory1 directory2 source
but its not working
I also used
tar -cvf file.tar --exclude directory1 directory2 source
but i dont think this is supported in solaris8 version of "tar".
Any help on this would be appreciated.
Thanks
star
can do this fairly easily. ftp://ftp.berlios.de/pub/star/alpha/
( with the -V pat="pattern" options)
Solaris 8 binaries can be got from blastwave.org
Rob
--
Rap it up for the common good
Let us enlist the neighbourhood
It's OK, I've overstood
This is a wordy rappinghood. OK, bye.
Tomtomclub, 1980.
This, of course, only applies to the Sun version of tar; your post is
ambiguous on the point.
Joe
----------
Faster, better, cheaper. Pick two.
> How to exlude few unwanted files or directories while taring.
> I am using solaris8 and the tar am using is not a GNU.
> I tried
> tar -cvf file.tar -X directory1 directory2 source
> but its not working
Why should it? Is "directory1 directory2" a filename??
man tar already yet
> I also used
> tar -cvf file.tar --exclude directory1 directory2 source
> but i dont think this is supported in solaris8 version of "tar".
It is if you install gtar from the Solaris 8 companion CD
And gtar --help says:
--exclude=PATTERN exclude files, given as a PATTERN
-X, --exclude-from=FILE exclude patterns listed in FILE
What part of this dont you understand?
this I am trying to perform on staging and production server where I
dont have access to install any component.
I tried this one and seems to work
tar cvfX file.tar exclude.this *
where exclude.this consists of all the folder names which
needs to be excluded