gunzip

opening a .tar.gz file with a single command

when I download a .tar.gz file, I open it with two commands, first gunzip and then tar. Is it possible to open it with just one command? ...

gunzip preform task and rezip

Hello all I want to perform this awk -F, '$1 ~ /F$/' file.dat on a whole direcory of gziped files I want to be able to loop through each file unzip it perform the above command (print out any findings) rezip and move onto the next zipped file how can this be done? Thanks ...

How can I compare file list from a tar archive and directory?

I am still learning Perl. Can anyone please suggest me the Perl code to compare files from .tar.gz and a directory path. Let's say I have tar.gz backup of following directory path which I have taken few days back. a/file1 a/file2 a/file3 a/b/file4 a/b/file5 a/c/file5 a/b/d/file and so on.. Now I want to compare files and directories ...

What is the best way to gunzip files with Perl?

Is there a faster solution than my actual 'zcat' solution to gunzip files with Perl? A little benchmark: #!/usr/bin/perl use strict; use warnings; use Benchmark qw(cmpthese timethese); use IO::Uncompress::Gunzip qw(gunzip); my $re = qr/test/; my $bench = timethese($ARGV[1], { zcat => sub { if (defined open(my $FILE, "-|", "zc...

Unzipping unfinished gzip...possible?

So I just spent a week running a simulation, but the computer had to be turned off to move it (terrible, I know). The data that was being produced was being zipped due to it's size by piping it into gzip, but since the simulation wasn't finished, I can't unzip the .gz file. We have since started the simulation over, but I was wondering...

get the filesize of very large .gz file on a 64bit platform

According to the specifiction of gz the filesize is saved in the last 4bytes of a .gz file. I have created 2 files with dd if=/dev/urandom of=500M bs=1024 count=500000 dd if=/dev/urandom of=5G bs=1024 count=5000000 I gziped them gzip 500M 5G I checked the last 4 bytes doing tail -c4 500M|od -I (returns 512000000 as expected)...

How to check if a Unix .tar.gz file is a valid file without uncompressing?

I also found this link. But I was wondering if there is any ready made command line solution? ...

What is the fastest way to unzip textfiles in Matlab during a function?

Hello all, I would like to scan text of textfiles in Matlab with the textscan function. Before I can open the textfile with fid = fopen('C:\path'), I need to unzip the files first. The files have the extension: *.gz There are thousands of files which I need to analyze and high performance is important. I have two ideas: (1) Use an ex...

Pipe multiple files (gz) into C program

I've written a C program that works when I pipe data into my program using stdin like: gunzip -c IN.gz|./a.out If I want to run my program on a list of files I can do something like: for i `cat list.txt` do gunzip -c $i |./a.out done But this will start my program 'number of files' times. I'm interested in piping all the files in...

GUNZIP / Extract file "portion by portion"

Hi. I'm on a shared server with restricted disk space and i've got a gz file that super expands into a HUGE file, more than what i've got. How can I extract it "portion" by "portion (lets say 10 MB at a time), and process each portion, without extracting the whole thing even temporarily! No, this is just ONE super huge compressed file, ...

Uncompres a gzip file from CURL, on php

Does anyone know how to uncompress the contents of a gzip file that i got with curl? for example: http://torcache.com/torrent/63ABC1435AA5CD48DCD866C6F7D5E80766034391.torrent responded HTTP/1.1 200 OK Server: nginx Date: Wed, 09 Jun 2010 01:11:26 GMT Content-Type: application/x-bittorrent Content-Length: 52712 Last-Modified: Tue, 08 ...

uzing libgz to inflate a gz input

Hi all, I'm currently trying to use the zlib to inflate a source of gzipped data. It seems that the inflate API in zlib cannot inflate a gzipped data ( The example http://www.zlib.net/zpipe.c fails to read a gzipped file: "zpipe: invalid or incomplete deflate data" ). I noticed that there is a gzopen function in this API, but , as far a...

Why is my programmatic compression dropping the file extension?

I am using C# to programatically compress an xml file. Compression works fine, but when I gunzip the file from the command line, the extension has been dropped. Why would this be? The destination file coming in has the gz extension while the source file has an xml extension. Here is my compression code: using (FileStream...

gunzip a file stream in R?

I'm trying to create an R API for StackOverflow. The output is gzipped. For example: readLines("http://api.stackoverflow.com/0.9/stats/", warn=F) [1] "\037‹\b" ...