1753460 Members
4883 Online
108794 Solutions
New Discussion юеВ

Re: Tar with input file

 
SOLVED
Go to solution
Fabreg
Occasional Contributor

Tar with input file

Hi sysadmin,

I need to do a tar file with a list files.

In linux, or sun I can do it with

tar cvf file.tar -I list.txt (in linux)
tar cvf file.tar -T list.txt (in sun)

How to do the same in HP-UX B.11.23 ?

Many thanks.
Regards.
Fabrizio
8 REPLIES 8
Jeff_Traigle
Honored Contributor
Solution

Re: Tar with input file

This is the only way offhand I can think of:

tar cvf file.tar $(cat list.txt)
--
Jeff Traigle
Steven Schweda
Honored Contributor

Re: Tar with input file

> tar cvf file.tar -I list.txt (in linux)

If you're using GNU "tar" on your Linux
system(s), why not install it on your HP-UX
(and/or Solaris) system(s), too?

http://www.gnu.org/software/tar/

Google can probably find you a depot, if you
can't build it from a source kit.
Fabreg
Occasional Contributor

Re: Tar with input file

Ok, the Jeff solution helped.
maybe a native option would be a better solution, but if it's not available at this time it makes no difference.

Many thanks.

Best regard.
Fabrizio.
Fabreg
Occasional Contributor

Re: Tar with input file

Ok, the Jeff solution helped.
maybe a native option would be a better solution, but if it's not available at this time it makes no difference.

thanks a lot.

Best regards.
Fabrizio.
Steven Schweda
Honored Contributor

Re: Tar with input file

> 1 pts
[You have to admire the forum software.]

I gather that you didn't like the GNU "tar"
suggestion, but I did ask "Why not", and I
would like to know why not, so I'll try
asking again. Why not?
Dennis Handly
Acclaimed Contributor

Re: Tar with input file

>I need to do a tar file with a list files.
>How to do the same in HP-UX B.11.23?

You give up on tar(1) and use pax(1):
$ pax -f file.tar -w -v < list.txt

>Steven: Why not?

It's foreign devil software? :-)
Steven Schweda
Honored Contributor

Re: Tar with input file

> It's foreign devil software? :-)

That _is_ a powerful argument, but the desire
seemed to be for compatibility with the
foreign-devil "tar" on the foreign-devil OS,
and using the same foreign-devil "tar" on
HP-UX seemed to me to be a pretty easy way to
get amazingly good compatibility with the
same program elsewhere.

Obviously my opinion has little value,
however. (I get that often.)
Torsten.
Acclaimed Contributor

Re: Tar with input file

Steven, don't be surprised!

You cannot get 10 points for an "unexpected" solution...

I think there was another linux like solution in hp-ux expected, but your solution is maybe too much linux like and not enough native hp-ux?

IMHO most thread owners can only scroll down to "1" in the moment of surprise when getting a valuable answer, if they are even able to assign something at all.

;-))

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!