1834789 Members
2586 Online
110070 Solutions
New Discussion

tar and include file

 
SOLVED
Go to solution
Gemini_2
Regular Advisor

tar and include file

Hi...on my system, I have two versions of tar
/sbin/tar and /usr/bin/tar. I want the tar to read an include file, but tar version on hp-ux doesnt seem to do that? or, is there?? please advise.

also, when I do man, it automatically read the man page on the /sbin/tar, how I do read the man page on /usr/bin/tar?

thank you

5 REPLIES 5
harry d brown jr
Honored Contributor

Re: tar and include file

The "tar" standard does NOT include and include or exclude options. May I suggest you get a copy of gnu's tar, ported by HP, from here:

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

If you are trying to "exclude files, then you can use this:

find . -print | grep -v -E -f ./excludelist | grep -v "^\.$"| pax -w > /backuppath


pax , by default, writes archives in the ustar extended tar interchange format. (do a man pax)

live free or die
harry

Live Free or Die
Kirk Gardner
Advisor

Re: tar and include file

GNU tar has the include switch '-T'.

I'm not sure how you have determined that the man page for tar (man -f tar) is specifically for the /sbin/tar command?
Patrick Wallek
Honored Contributor
Solution

Re: tar and include file

The two "versions" of tar are essentially the same. The version of tar in /sbin is available there so that you can use it while in single-user mode to recover files, like files from /usr/bin, if need be. They both support the same options, or don't support them in your case.

If you do a file on each tar, you see:

# file /usr/bin/tar /sbin/tar
/usr/bin/tar: PA-RISC1.1 shared executable dynamically linked
/sbin/tar: PA-RISC1.1 shared executable

The dynamically linked means that it is using libraries that are only available when all filesystems are mounted. /sbin/tar is linked differently and does not require these libraries to function. That is why it works in single-user mode.

I, too, would recommend you have a look at GNUTar for the functionality you require.
Gemini_2
Regular Advisor

Re: tar and include file

cool, I just want to make sure that I did check every resource! thank you

Mimosa
Gemini_2
Regular Advisor

Re: tar and include file

HI Patrick

by the way, it was very **clear* explaination on the difference between sbin and usr/bin

thank you!!!!!