Operating System - HP-UX
1748106 Members
4933 Online
108758 Solutions
New Discussion юеВ

How to exclude a folder in HP UX tar

 
SOLVED
Go to solution
Satya Thotapalli
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
Shrikant Lavhate
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!
Yogeeraj_1
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)
Shrikant Lavhate
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!
Dennis Handly
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
SANTOSH S. MHASKAR
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
Satya Thotapalli
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
Dennis Handly
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