Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Using gzip

Posted on 2005-04-07
6
Medium Priority
?
266 Views
Last Modified: 2010-04-20
Hi guys,

Is there a way to zip up a file without having that same file touched?

What I mean is, if I do the following:

gzip xxxx.dsk

It makes

xxxx.dsk.gzip

Not a new, second file so you have

xxxx.dsk, and xxxx.dsk.gzip

Id like to be able to have:

xxxx.dsk, and xxxx.dsk.gzip

Thank you.

Simon
0
Comment
Question by:Simon336697
6 Comments
 
LVL 23

Expert Comment

by:Mysidia
ID: 13733055
gzip -9 < originalfile > targetfile.gz

[If targetfile.gz  already exists, it will be overwritten]
0
 
LVL 23

Accepted Solution

by:
Mysidia earned 1200 total points
ID: 13733061
Oh,  -9  just means  'best compression'

you can do

gzip  < sourcefile > targetfile.gz

also

similarly, to decompress  without effecting the compressed file...

gzip -d < compressedfile.gz > uncompressedfile

0
 
LVL 48

Assisted Solution

by:Tintin
Tintin earned 400 total points
ID: 13733062
or simply

gzip <file >file.gz

BTW, gz is the standard extension for gzip files, not gzip.
0
Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

 
LVL 12

Assisted Solution

by:GinEric
GinEric earned 400 total points
ID: 13734253
Yes, and it would be nice if someone told a lot of developers it must be tarred then compressed and end in .tar.gz

and not .tgz
0
 
LVL 1

Author Comment

by:Simon336697
ID: 13772243
Thanks guys!!!
0
 
LVL 12

Expert Comment

by:GinEric
ID: 13776548
Thank you Simon336697
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

577 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question