cancel
Showing results for 
Search instead for 
Did you mean: 

gzip

 
himacs
Super Advisor

gzip

I am facing issue with gzip.

As far my knowledge gzip coomand zip the file and replaces xxx.gzip over original file.

But here it zip the file and keeps both files original and zipped file. so wastage of disk space.

My server is B.11.23


Pleas suggest on this..


Regards
himacs
11 REPLIES
Michael Steele_2
Honored Contributor

Re: gzip

Hi

What is your command? And don't use the -c option. Just 'gzip file'.
Support Fatherhood - Stop Family Law
Steven Schweda
Honored Contributor

Re: gzip

> As far my knowledge [...]

"man gzip" might extend your knowledge.

> But here [...]

Where is "here"?

> What is your command? [...]

A fair question.
Laurent Menase
Honored Contributor

Re: gzip

in fact while gziping, it creates a new file and remove the original one if it is a success


gzip toto
will first open a toto.gz then compress outputing to toto.gz, and if there is no error
remove toto


so at a time toto and toto.gz size must be available
Laurent Menase
Honored Contributor

Re: gzip

if you don't have enough available space locally, you can do the following

gzip /somewherewithspace/gzipfile.gz
himacs
Super Advisor

Re: gzip

Hi Admins,

Thanx for your responses and sorry for my delayed response.

Actually issue is not with OS side.Everyday syncing and splitting is happening between PROD and Backup servers.During this time file will be overwritten in backup server from prod server.But some files are not overwritten,only appeneded.


regards
himacs


Steven Schweda
Honored Contributor

Re: gzip

> Actually [...]

Perhaps you should start by explaining
exactly what you're doing, and then exactly
what you see happening.
F Verschuren
Esteemed Contributor

Re: gzip

Please check ypu permisions, it sounts like the user that is zipping the file has enauf permisions to remove the file.
does a normal rm works (not -f) of the file you have zipped (from same server, user) as the zip command is running.

besides the mounting/privilages cause I do not know if there can be someting els.
Nafez ALNajjar
Frequent Advisor

Re: gzip

Hi,
I am not sure if there is an option for deleting the original file after compressing it ,but you can create a script that compress the file ,then deletes the original file ,like:
gunzip
rm
Rahul Rai_1
Frequent Advisor

Re: gzip

Hello Himacs,

yes you are correct gzip compress the file and then remove the original one, but while compressing the file it will consume the double size on the device, when it compress successfully then it will remove the original file and only xxx.gzip file remain.

you can check:-

just create a temporary file and gzip them after zipped the file try to call that one it will never list with the original file.

Please correct me if I am wrong. :)

Regards,
Rahul Rai.

Re: gzip

>Rahul Rai: gzip compress the file and then remove the original one, but while compressing the file it will consume the double size

Hopefully not double. :-)
You can check this by using tusc.
Rahul Rai_1
Frequent Advisor

Re: gzip

>Hopefully not double. :-)

yes you are wright not double :-), thx for correction.


Regards,
Rahul Rai.