Operating System - HP-UX
1825592 Members
1976 Online
109682 Solutions
New Discussion

Re: How to gzip a 2.5 GB file.

 
Saraswathy_1
Advisor

How to gzip a 2.5 GB file.

Hi
I am unable to open through "vi" as well unable to gzip the file. Its giving "Unknown Error" message.

the file size is 2.5 GB
7 REPLIES 7
Robert-Jan Goossens
Honored Contributor

Re: How to gzip a 2.5 GB file.

Hi,

If I remember correct there was a size limit in older versions of gzip. Try to install a more recents version. (link is below)

http://hpux.its.tudelft.nl/hppd/hpux/Gnu/gzip-1.3.5/

Regards,
Robert-Jan
H.Merijn Brand (procura
Honored Contributor

Re: How to gzip a 2.5 GB file.

'vi' on a 2.5 Gb size file will never work. That's just too big for that editor.

a compressed file cannot be edited with vi

file size doesn't matter if you compress pipewise

# gzip -9 < large_file > file.gz

GNU gzip has lifted the file size limit long ago. Get the newer version (1.3.5) from the link posted above, or from my site: http://mirrors.develooper.com/hpux/downloads.html where I have it available for HP-UX 10.20 through 11i

You can also compile it from source yourself. Get it at ftp://alpha.gnu.org/gnu/gzip/

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Isralyn Manalac_1
Regular Advisor

Re: How to gzip a 2.5 GB file.

Hi,

vi won't be able to open such a huge file and add the fact that it is a compressed file. Try to get a newer version of gzip.

Regards,

Ira
H.Merijn Brand (procura
Honored Contributor

Re: How to gzip a 2.5 GB file.

Isralyn, what does your post add to this thread? You just repeat the info already passed in the previous two posts.

No points for this post please.

Enjoy, Have FUN! H.Merijn [ who likes a clean forum with *solutions* to search for ]
Enjoy, Have FUN! H.Merijn
V. Nyga
Honored Contributor

Re: How to gzip a 2.5 GB file.

Hi,

are you sure it's a gzipped file?
With 'file ' you'll get an information if it's zip or tar or others.

Volkmar
*** Say 'Thanks' with Kudos ***
Yogeeraj_1
Honored Contributor

Re: How to gzip a 2.5 GB file.

hi,

is it a text file?

if yes, you may also wish to "split" the file into multiple ones and use "vi" as you wish...

e.g.
split myfile output

then
vi output*

then when you reach end of the currrent file, switch to the next by doing:
"Esc"+":n"

hope this helps too!

regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Alex Grigore
Advisor

Re: How to gzip a 2.5 GB file.

Hi Saraswathy,

It may not be an issue with largefiles being enabled in /etc/fstab.

Try splitting the file and gzip the splitted files.

Should be something like:
split -b1000000k $path/$file.tar $path/$file.tar_
/usr/contrib/bin/gzip -v $path/$file.tar_*

To restore the initial file, use cat file1 file2 >large_file after unzipping.

This should work.

Regards,
Alex