1753781 Members
7549 Online
108799 Solutions
New Discussion юеВ

tar 1.5.1 problem

 
SOLVED
Go to solution
boomer_2
Super Advisor

tar 1.5.1 problem

Hi guys,
I have tar 1.5.1 installed from one of my forum thread..for gnu tar utility to take a tar of more than 2 gb...
but when i run tar -cvf test.tar /home which is 5 gb in size the tar file is cretaed but the file is not compressed..the same file size of 5 tar is getting formed..what should i do??
23 REPLIES 23
Peter Godron
Honored Contributor

Re: tar 1.5.1 problem

Hi,
tar is an archiving method not a compression tool!

use tools like compress, gzip ... for compression of the files.

See:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1053335
and the last answer in
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=775222

Please also read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33 on how to reward any useful answers given to your questions.
Robert-Jan Goossens_1
Honored Contributor

Re: tar 1.5.1 problem

Hi,

Try adding the z option.

# gtar cvzf test.tar.gz /home

Regards,
Robert-Jan
Indrajit_1
Valued Contributor

Re: tar 1.5.1 problem

Hi;

You can zip the file using gzip command

#gzip file_name.

If it is a directoy, then tar the directory and then zip the file

#tar -cvf dir.tar dir
#gzip dir.tar
You can also use gtar command.

Cheers;
Indrajit Roy
Never Ever Give Up
boomer_2
Super Advisor

Re: tar 1.5.1 problem

Hi Indrajit,
im not able to find gtar command in my server....
Rasheed Tamton
Honored Contributor

Re: tar 1.5.1 problem

Hi,

It is already mentioned.
Still, for clarity here is the full path for gzip.

1.

/usr/contrib/bin/gzip test.tar

(filename of the tar - in your case test.tar)

2.
compress test.tar

Regards,
Rasheed Tamton.
boomer_2
Super Advisor

Re: tar 1.5.1 problem

Hi rasheed,
I think my questn is not clear...
what i mean to ask u guys is that after creating a tar archive should my directory size be reduced ? and if yes then to what extent ..by how many % ?
And second thing i have installed gnu tar since i need to take a tar of 5gb directory.. from http://hpux.connect.org.uk/hppd/hpux/ as a result of which im not able to find gtar command in my server..i doubt whether gnu tar has been properly installed...
Dennis Handly
Acclaimed Contributor

Re: tar 1.5.1 problem

>after creating a tar archive should my directory size be reduced?

Your original files may be increased if they had holes in them and when tar reads them, it would fill in these holes.

The size of the archive should be the sum of the files plus overhead. Only when compressing would you have a reduced size.

gnu tar is just probably called tar and not gtar. Typically if you want to make sure you keep your foreign devil tools separate from HP's, you use g* as the name.
Rasheed Tamton
Honored Contributor

Re: tar 1.5.1 problem

Hi Boomer,

/usr/local/bin/gtar - it should be the default location.

or try to find

find /usr -name gtar

or any dir where you think this might have gone in.

Reg. the reduction of the size, as far as I noticed, normally it should not impact.
Tar as a tool is used for archiving/backing up or moving files around from systems to systems, etc. It is not meant anyway for anyway of compression.


Regards,
Rasheed Tamton.
boomer_2
Super Advisor

Re: tar 1.5.1 problem

Hi rasheed,
no gtar found on my server..