1820646 Members
2028 Online
109626 Solutions
New Discussion юеВ

how to use GNU tar?

 
SOLVED
Go to solution
thebeatlesguru
Regular Advisor

how to use GNU tar?

i have installed the GNU tar,however i find there is so many tar in my box:
/etc/tar
/usr/bin/tar
/usr/local/bin/tar
/usr/local/doc/tar
/var/adm/sw/products/tar
/var/adm/sw/save/PHCO_20028/UX-CORE/sbin/tar
/var/adm/sw/save/PHCO_20028/UX-CORE/usr/bin/tar
/sbin/tar

and i find the man tar is still show the old tar

which one i should use to backup a file larger then 2G ,and how to use the new tar command?

hihi
6 REPLIES 6
Stefan Farrelly
Honored Contributor
Solution

Re: how to use GNU tar?


To find out which one matches the gnu tar you installed check via software distributor (as long as you used SD to install it), eg;

swlist -l file tar | grep bin

(substitute tar for installed product name, eg. gnutar)
And it will show the bin dir which gnu tar installed to. You just use gnu tar normally - tar cf <2gb+ file>. If you add the manpath in then you can see the installed manpage for gnutar, eg;

MANPATH=$MANPATH:/man

(you can set permanently in /etc/MANPATH)
Im from Palmerston North, New Zealand, but somehow ended up in London...
Andreas Voss
Honored Contributor

Re: how to use GNU tar?

Hi,

the GNU tar is:

/usr/local/bin/tar


Regards
Stefan Farrelly
Honored Contributor

Re: how to use GNU tar?

Andreas,

it depends completely on where you got gnu tar from - we got ours from the HP Porting centre and it installs to /opt/tar/bin/tar

Im from Palmerston North, New Zealand, but somehow ended up in London...
thebeatlesguru
Regular Advisor

Re: how to use GNU tar?

i cant use the new tar corretcly,there is some porblems:
/usr/local/bin/tar cf core.rm /usr/local/bin/core
/usr/lib/dld.sl: Can't open shared library: /usr/local/lib/libiconv.sl
/usr/lib/dld.sl: No such file or directory
Abort(coredump)

whats up?
hihi
Dirk Wiedemann
Respected Contributor

Re: how to use GNU tar?

Hello,

you have assumedly search for tar whith the find command. That means, you not only found tar binaries but also doc files etc.
If you want only found the binaries, type "whereis tar".
If you want to find out, which tar binary is used when typing tar without path: type "which tar".
to your list:
/etc/tar is a link to /usr/bin/tar
/usr/bin/tar is standard tar from HP-UX, dynamically linked
/usr/local/bin is assumedly the gnu tar binary
/usr/local/doc/tar is a directory with documents to gnu tar
/var/adm/sw/products/tar is a directory with installion files for gnu tar
the PHCO directory containes the files from patch PHCO_20028, which delivers new versions of HP-UX standard tar
/sbin/tar is standard tar from HP-UX, statically linked
The gnu man pages are assumedly locatet under /usr/local/man/man*, you can search for them with "find /usr/local/man -name tar.*". To display them add the path containing the gnu tar manpage in front of your environment variable $MANPATH.
To activate the gnu tar instead of the standard tar you can do for example the following:
- locate first tar binary with "which tar"
- move this tar to a save copy (e.g. mv /usr/bin/tar /usr/bin/tar.sik)
- create a link to the gnu tar (e.g. ln -s /usr/local/bin/tar /usr/bin/tar).

regards
Dirk
Dirk Wiedemann
Respected Contributor

Re: how to use GNU tar?

to your last posting:
You haven't install the necessary dependency libiconv.
You can get it from here:
http://hpux.connect.org.uk/hppd/hpux/Development/Libraries/libiconv-1.8/
Check also the other dependency gettext.

regards
Dirk