Goga Goga - 1 year ago 75
Linux Question

How to gunzip without delete?

How to unzip

all archives without delete in specified folder?

I tried:
gunzip *.gz /folder

Answer Source

can be done with some bash scripting using gzip --stdout option and compute the uncompressed name with bash substitution:

for i in *.gz
   echo unzipping $i to /folder/${i/.gz}
   gunzip --stdout "$i" > "/folder/${i/.gz}"

the current implementation fails with filenames containing spaces

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download