Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

tar exclude in solaris 8?

540 views
Skip to first unread message

senthilS

unread,
Sep 2, 2005, 10:15:36 AM9/2/05
to
Hi All,

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

Rob Shepherd

unread,
Sep 2, 2005, 10:33:55 AM9/2/05
to
senthilS wrote:
> Hi All,
>
> How to exlude few unwanted files or directories while taring.
>
> I am using solaris8 and the tar am using is not a GNU.
>

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.

Joe

unread,
Sep 2, 2005, 11:02:05 AM9/2/05
to
According to my copy of the FM, -X is followed by the name of a file
which contains a list of excluded file names.

This, of course, only applies to the Sun version of tar; your post is
ambiguous on the point.

Joe
----------
Faster, better, cheaper. Pick two.

ger...@vcn.bc.ca

unread,
Sep 2, 2005, 1:18:01 PM9/2/05
to

senthilS wrote:

> 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?

senthilS

unread,
Sep 6, 2005, 11:07:13 AM9/6/05
to
Thanks,

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

0 new messages