Running gzip from command prompt

Log in to stop seeing adverts
This page may contain links to companies such as eBay and Amazon. As an affiliate of these sites I may earn commission if you click the link and make a purchase

Status
Not open for further replies.

Joe_Fox

Well-Known Member
Hi,

Can anyone help me here - should be simple enough to those who are familiar with using the command prompt, etc.

I have some logfiles in location E:\logfiles\folder\subfolder

I need to compress these using gzip and have the compressed files overwrite the current logfiles (so that the .log files are replaced with .log.gz files).

The advice I have been given is to run gzip.exe -9v *.log from the command prompt.

Is this write or do I need to specify the correct folder and the correct destination for the compressed files?

Thanks,
Joe
 
Hi,

Can anyone help me here - should be simple enough to those who are familiar with using the command prompt, etc.

I have some logfiles in location E:\logfiles\folder\subfolder

I need to compress these using gzip and have the compressed files overwrite the current logfiles (so that the .log files are replaced with .log.gz files).

The advice I have been given is to run gzip.exe -9v *.log from the command prompt.

Is this write or do I need to specify the correct folder and the correct destination for the compressed files?

Thanks,
Joe

Have you tried copying the files to another location and testing that command?
 
Hi,

Can anyone help me here - should be simple enough to those who are familiar with using the command prompt, etc.

I have some logfiles in location E:\logfiles\folder\subfolder

I need to compress these using gzip and have the compressed files overwrite the current logfiles (so that the .log files are replaced with .log.gz files).

The advice I have been given is to run gzip.exe -9v *.log from the command prompt.

Is this write or do I need to specify the correct folder and the correct destination for the compressed files?

Thanks,
Joe

gzip.exe -9v E:\logfiles\folder\subfolder\whatever.log

?
 
Hi,

Can anyone help me here - should be simple enough to those who are familiar with using the command prompt, etc.

I have some logfiles in location E:\logfiles\folder\subfolder

I need to compress these using gzip and have the compressed files overwrite the current logfiles (so that the .log files are replaced with .log.gz files).

The advice I have been given is to run gzip.exe -9v *.log from the command prompt.

Is this write or do I need to specify the correct folder and the correct destination for the compressed files?

Thanks,
Joe


Gzip is a command line only utility, it's an old Linux app.
You would need to specify the path to the file that you want to compress, but it won't overwrite that file(don't think so anyways)

A much easier way would be to use 7-zip, it can handle .gz files and has a nice pretty Windows GUI
 
Cheers Macky,
Gzip does overwrite too so jolly good.
 
Status
Not open for further replies.
Log in to stop seeing adverts

P Pld Pts
1Liverpool1639
2Chelsea1735
3Arsenal1733
4Nottm F1731
5Bournemouth1728
6Aston Villa1728
7Manchester C  1727
8Newcastle1726
9Fulham1725
10Brighton1725
11Tottenham 1723
12Brentford1723
13Manchester U1722
14West Ham1720
15Everton1616
16Palace1716
17Leicester1714
18Wolves1712
19Ipswich1712
20Southampton176

Latest posts

Back
Top