tar command problem

I’m trying to use ‘system(tar -xf somefilename.tar)’ to extract a tar file
in my program, when
tar -xf encounters problem, it simplly prints the message on the shell,
system() still returns a value
of 0, same value as if ‘tar-xf’ succeeds… then there is no way for my
program to know wether ‘tar -xf’ failed or not.
in the help, there is no information on tar command’s exit status…


is there an equivalent C/C++ function that implements ‘tar’? if not, is
there another utility command which has an exit status that can un-tar a tar
file?

Ran Zhang wrote:

I’m trying to use ‘system(tar -xf somefilename.tar)’ to extract a tar file
in my program, when
tar -xf encounters problem, it simplly prints the message on the shell,
system() still returns a value
of 0, same value as if ‘tar-xf’ succeeds… then there is no way for my
program to know wether ‘tar -xf’ failed or not.
in the help, there is no information on tar command’s exit status…


is there an equivalent C/C++ function that implements ‘tar’? if not, is
there another utility command which has an exit status that can un-tar a tar
file?

Try libtar:

http://www.feep.net/libtar/

It should compile and run on Neutrino with no difficulty.

cheers,

Kris

what’s the username and password for ftp server feep.net? I tried to
directly download from the web site with the link:
ftp://ftp.feep.net/pub/software/libtar/libtar-1.2.11.tar.gz
it did’t go through, then i tried to ftp to that server, i tried username
with “USER”, password with “PASS”. didn’t work.

or can you put the source code libtar-1.2.11.tar.gz here?

“Kris Warkentin” <kewarken@qnx.com> wrote in message
news:cv5e4p$f32$1@inn.qnx.com

Ran Zhang wrote:
I’m trying to use ‘system(tar -xf somefilename.tar)’ to extract a tar
file
in my program, when
tar -xf encounters problem, it simplly prints the message on the shell,
system() still returns a value
of 0, same value as if ‘tar-xf’ succeeds… then there is no way for
my
program to know wether ‘tar -xf’ failed or not.
in the help, there is no information on tar command’s exit status…


is there an equivalent C/C++ function that implements ‘tar’? if not, is
there another utility command which has an exit status that can un-tar a
tar
file?

Try libtar:

http://www.feep.net/libtar/

It should compile and run on Neutrino with no difficulty.

cheers,

Kris

nevermind, I got it. thank you
“Ran Zhang” <rzhang@vamcointernational.com> wrote in message
news:cv5h96$h73$1@inn.qnx.com

what’s the username and password for ftp server feep.net? I tried to
directly download from the web site with the link:
ftp://ftp.feep.net/pub/software/libtar/libtar-1.2.11.tar.gz
it did’t go through, then i tried to ftp to that server, i tried username
with “USER”, password with “PASS”. didn’t work.

or can you put the source code libtar-1.2.11.tar.gz here?

“Kris Warkentin” <> kewarken@qnx.com> > wrote in message
news:cv5e4p$f32$> 1@inn.qnx.com> …
Ran Zhang wrote:
I’m trying to use ‘system(tar -xf somefilename.tar)’ to extract a tar
file
in my program, when
tar -xf encounters problem, it simplly prints the message on the
shell,
system() still returns a value
of 0, same value as if ‘tar-xf’ succeeds… then there is no way for
my
program to know wether ‘tar -xf’ failed or not.
in the help, there is no information on tar command’s exit status…


is there an equivalent C/C++ function that implements ‘tar’? if not,
is
there another utility command which has an exit status that can un-tar
a
tar
file?

Try libtar:

http://www.feep.net/libtar/

It should compile and run on Neutrino with no difficulty.

cheers,

Kris

Ran Zhang wrote:

what’s the username and password for ftp server feep.net? I tried to
directly download from the web site with the link:
ftp://ftp.feep.net/pub/software/libtar/libtar-1.2.11.tar.gz
it did’t go through, then i tried to ftp to that server, i tried username
with “USER”, password with “PASS”. didn’t work.

Traditionally, you use “anonymous” as the user ID and enter your email
address as the password.


Chris Herborth (cherborth@qnx.com)
Never send a monster to do the work of an evil scientist.

can u give me the version that is ported to qnx? I get some compilations
errors while make, like libtar.a is not found…


“Ran Zhang” <rzhang@vamcointernational.com> wrote in message
news:cv5hfq$hg8$1@inn.qnx.com

nevermind, I got it. thank you
“Ran Zhang” <> rzhang@vamcointernational.com> > wrote in message
news:cv5h96$h73$> 1@inn.qnx.com> …
what’s the username and password for ftp server feep.net? I tried to
directly download from the web site with the link:
ftp://ftp.feep.net/pub/software/libtar/libtar-1.2.11.tar.gz
it did’t go through, then i tried to ftp to that server, i tried
username
with “USER”, password with “PASS”. didn’t work.

or can you put the source code libtar-1.2.11.tar.gz here?

“Kris Warkentin” <> kewarken@qnx.com> > wrote in message
news:cv5e4p$f32$> 1@inn.qnx.com> …
Ran Zhang wrote:
I’m trying to use ‘system(tar -xf somefilename.tar)’ to extract a
tar
file
in my program, when
tar -xf encounters problem, it simplly prints the message on the
shell,
system() still returns a value
of 0, same value as if ‘tar-xf’ succeeds… then there is no way
for
my
program to know wether ‘tar -xf’ failed or not.
in the help, there is no information on tar command’s exit
status…


is there an equivalent C/C++ function that implements ‘tar’? if
not,
is
there another utility command which has an exit status that can
un-tar
a
tar
file?

Try libtar:

http://www.feep.net/libtar/

It should compile and run on Neutrino with no difficulty.

cheers,

Kris

\

Ran Zhang wrote:

can u give me the version that is ported to qnx? I get some compilations
errors while make, like libtar.a is not found…

I downloaded it and did a './configure ; make ’ and it built without any
errors or warnings. What problem were you having?

cheers,

Kris