General
cancel
Showing results for 
Search instead for 
Did you mean: 

How to exclude a folder in HP UX tar

 
SOLVED
Go to solution
Highlighted
Occasional Advisor

How to exclude a folder in HP UX tar

How to exclude a folder in HP UX tar ?
I want to exclude a list of folders when i use tar.

I know that other UX versions offer
option eg-

tar cvfX exclude.tar *

the above will exclude the folders specified in exclude.tar
7 REPLIES 7
Highlighted
Esteemed Contributor

Re: How to exclude a folder in HP UX tar

Hi,

HP Ux too have standard tar I guess. So normal options of classical tar will works in hpux too. A look at a man page will give you a hint.

-=ShRi=-
Will it remain a personal, if I broadcast it here!
Highlighted
Honored Contributor
Solution

Re: How to exclude a folder in HP UX tar

hi,

Unfortunately, the HP-UX tar does not support the X argument unlike the gnu-tar.

You may wish to consider the solutions provided in the following thread:
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=246415


hope this helps!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Highlighted
Esteemed Contributor

Re: How to exclude a folder in HP UX tar

Thanks Yogeeraj for making it crystal clear to me!
Will it remain a personal, if I broadcast it here!
Highlighted
Acclaimed Contributor

Re: How to exclude a folder in HP UX tar

Here are some more threads that talk about using pax(1) to exclude files:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1195436
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1206984

Unfortunately the -c option only works when extracting.

You could do something like:
ls | grep -v -e ^filename | pax -w -f foo.tar -v
Highlighted
Trusted Contributor

Re: How to exclude a folder in HP UX tar

Hi Satya,

You can install gnu tar on HP-UX.

U can get it from below:

http://hpux.connect.org.uk/hppd/hpux/Gnu/tar-1.19/

- Santosh
Highlighted
Occasional Advisor

Re: How to exclude a folder in HP UX tar

Thanks Yogeeraj! I've used the solution suggested by you to solve my problem.
Thanks Sri,Hadley and Santosh for your time and help.
Regards,
Satya
Highlighted
Acclaimed Contributor

Re: How to exclude a folder in HP UX tar

You haven't assigned any points yet. If our answers were help please read the following about assigning points and reopening threads:
http://forums.itrc.hp.com/service/forums/helptips.do?#33
http://forums.itrc.hp.com/service/forums/helptips.do?#41