Questions tagged [gzip]

A data compression program. Originally a GNU utility it has been cloned by most Unix variants.

Filter by
Sorted by
Tagged with
-2
votes
0answers
41 views

How to replace gzip compressed data with other data and still have a valid .gz file? [closed]

I'm experimenting. I created a .txt file with the word hi and run gzip test.txt to compress it. This gives me a file test.txt.gz with the following bytes: 1F 8B 08 08 E6 E8 3F 60 00 03 62 2E 74 78 ...
0
votes
1answer
18 views

How to uncompress a gzipped partition image and dd it directly to the destination partition without writing to current partition?

I've backed up a partition using sudo dd bs=8M if=/dev/sda2 | gzip > /someFolderOnSDB/sda2.img.gz. The image is stored on a separate disk sdb. When restoring it using gunzip -k /mnt/bkp/sda2.img.gz ...
0
votes
0answers
27 views

Gzipped image file will not boot when flashed to sd card

I have a script that creates a raw .img file: imgPath="/home/me/loopbackfile.img" dd if=/dev/zero of=$imgPath bs=4M count=300 losetup -fP $imgPath Partitions it... loopDevice=$(losetup -a | ...
0
votes
1answer
28 views

Compressing multiple files to .gz misbehaving

I had 100 images from a Raspberry Pi project and in order to transfer them to another computer, I used the "Compress" interaction after selecting all of the images and using the right click ...
1
vote
0answers
28 views

What is wrong with this gzip file [closed]

I downloaded a data dump of papers from arxiv.org The papers are gzipped archives, which can be opened up to see the internal latex, and other files/images used to form teh paper pdf. One archive in ...
0
votes
1answer
18 views

What would the value of hyphen actually look like in this instance used to refer to stdin for this archive command?

I am following a guide to learn terminal commands and have encountered the use of hyphens to refer to stdin in the following command used to find all files named 'file-A' within the directory ...
12
votes
8answers
4k views

How to gzip 100 GB files faster with high compression

We have 100+ GB files on a Linux machine, and while trying to perform gzip using below command, gzip is taking minimum 1-2 hours to complete: gzip file.txt Is there a way we can make gzip to run fast ...
0
votes
2answers
29 views

Gzip of folder while retaining original timestamp

I want to do gzip of folder, and also want to retain original timestamp for that folder. Can someone suggest any way around it. i tried below mentioned code. The timestamp which i am getting the time ...
0
votes
1answer
26 views

Split file from a streaming output with custom name and gzip

I have a script with a while loop that will print a text. I want to save it into files with custom name. Script: #!/bin/bash while true do echo "Press [CTRL+C] to stop.." done I can run ...
1
vote
1answer
33 views

Updating a large compressed file without creating temp file

I'm trying to figure out a way that I can update a compressed file (currently using zip, but am open to tar/gz/bz derivatives too) on a linux server without creating a temp file for the file to be ...
0
votes
0answers
37 views

294GB tar file, what are foreseeable problems?

In rhel 7.8 I have a folder called /study that has a bunch of data. It was ~500GB in size. I did gzip -9r /study and it reduced that folder to 294GB as reported by du -sh /study I then did tar -cf ...
10
votes
2answers
2k views

How portable is a gzip file over 4 GB in size?

To backup a snapshot of my work, I run a command like tar -czf work.tgz work to create a gzipped tar file, which I can then drop in cloud storage. However, I have just noticed that gzip has a 4 GB ...
2
votes
0answers
797 views

Correct/fix “gzip: stdin: unexpected end of file” in .gz file?

I use adb backup to backup my Android smartphone; and as noted in many posts, such as https://stackoverflow.com/questions/18533567/how-to-extract-or-unpack-an-ab-file-android-backup-file - I have ...
0
votes
2answers
42 views

What does gzip < my file.gzip > do?

I am playing around with Linux and came across gzip < my file.gzip >, and I wonder what it does. Can someone tell me what it does?
0
votes
1answer
73 views

How to extract a compressed tar using cpio to a particular directory location

I created the compressed tar file using the below command. find /app/jboss -not -name "*.err" -not -name "*.log" | cpio -o | gzip >/app/patchbkp/test/REDHAT_jboss-eap-7.2_18-Aug-...
0
votes
0answers
74 views

gzip -t output “gzip: filename.gz: extra field of X bytes ignored”

I have a bunch of .gz files I'm checking the integrity after data transfer with gzip -t -v file the output I'm getting is gzip: C2_CRRA200017850-1a_H3LJWDSXY_L1_2.fq.gz: extra field of 6 bytes ignored ...
0
votes
2answers
710 views

How do I gunzip to a particular directory?

I have .gz file like BIG5.gz. I want to gunzip this .gz file to the directory BIG5. This did not work: gunzip -c BIG5.gz > /BIG5
1
vote
2answers
80 views

Help in creating script

I am currently working on script with the following goals: Script will check every 15-minute if there is AppA.log4 in /logs directory. There are numerous apps in /logs directory, for example AppA....
1
vote
2answers
44 views

How to gzip specific files in a certain folder?

Good Day. I am creating a script that moves all 'logA' files in a certain folder and adds timestamp every 3 hours, afterwards it will be zipped. This is the base of the script: cd /logs mv *logA+...
0
votes
1answer
50 views

Why won't tar/gzip compress two similar large directories?

A long time ago, before I tried incremental and differential backups, I tried to tar/gzip several similar large (1 GB) directories, but they did not compress any better than tarring and gzipping each ...
0
votes
0answers
29 views

W3M freezes when rendering some pages

I get many websites not loading with either the following message: HTTP/1.1 200 OK HTTP/1.0 200 OK The loading process of the page gets frozen so I press Ctrl + C right away and then I get a parcial ...
0
votes
2answers
54 views

Another called script not going into background even given &

I have 2 scripts. I'm calling my script2 as sh scriptpath/script2.sh & inside script1 which compresses files using a combination of find, xargs and gzip commands on 16 files at a time. It is ...
0
votes
1answer
24 views

How to find files in the directory “/path/to/directory/” which contains information “SomeText” if they are in archives .gz?

I am using RHEL. How can I find files in the directory /path/to/directory/ which contain the string SomeText if those files are .gz archives?
1
vote
1answer
91 views

Rsyncing directory to a backup gzip file

Objective: The efficient backup and transfer of ~/dircontaininginnumeraltinyfiles/ to /mnt/server/backups/dir.tgz. My first thought was of course rsync and gzip. But I'm open to other routes as well. ...
1
vote
1answer
93 views

How can I completely zero out all free blocks (deleted files)

I'm making a backup of Raspbian (I know, this isn't the Raspberry Pi SE, but it's a Linux question and it probably isn't just Raspbian that has this problem and BTW, the size of the drive is 128GB). ...
0
votes
3answers
79 views

Compress a file into another file, with Gnu/Linux command line

I am trying to take a file containing text, named MyFile, and compress it into a file named MyFileComp, within the same directory. I have tried: gzip MyFile | touch MyFileComp gzip MyFile >> ...
1
vote
2answers
162 views

restoring hdd image using gzip throws error no space left on device

I created an image from a 256GB HDD using following command: dd if=/dev/sda bs=4M | pv -s 256G | gzip > /mnt/mydrive/img.gz later I tried to restore the image to another 512GB HDD on another ...
0
votes
2answers
49 views

How to create compressed archive split into multiple files while low on space

I'm to backup 7GB on 9GB drive. Means, I have about 2GB of empty space only. But tar related solutions require first - get everything into 1 file, next - split it. Is there any possibility to ...
0
votes
1answer
28 views

gzip multiples directory into archives in another directory

I want to back up each of the directories in /home, in separate .tar.gz files, to the /backup directory. Here an example. I know how to compress them. But not sure, how to send it in another directory....
0
votes
0answers
162 views

Stream multiple huge .tar.gz files into one file

I have a three .tar.gz files, and I need them all to be compressed into one .tar.gz file. After some googling I found the --concatenate option for tar, but that requires the files to be uncompressed ...
0
votes
1answer
29 views

unix uncompress multiple gz and save in particular directory

I have a directory with thousands of files .gz and I would like to uncompress and save the uncompressed files in a specific directory. I have tried but I can get it (beginner in this field). Thanks
31
votes
4answers
5k views

GZip doesn't produce the same compressed result on macOS vs Linux

I have a few thousand files that are individually GZip compressed (passing of course the -n flag so the output is deterministic). They then go into a Git repository. I just discovered that for 3 of ...
0
votes
1answer
856 views

Difference between gzip -d and zcat

I was wondering what the difference is when decompressing using gzip -d and zcat. Sometimes when I try gzip -d it says unknown suffix -- ignored. However, zcat works perfectly.
0
votes
1answer
603 views

Repair corrupted tar.gz file

Alright so I'm trying to extract a Google Takeout archive, extension is tar.gz and the file command says gzip compressed data. The archive is split into 11 tar.gz files. The 6th tar.gz file is ...
0
votes
0answers
107 views

zgrep with large pattern file

I do not know a lot about the underlying process that grep goes through and I am searching with a long pattern (863 members) in a large file 646.1 MB (zipped) and it is taking some time. I thought ...
0
votes
0answers
30 views

Anyway to provide hint to zgrep to search part of file for faster search results

Production logs file are huge in size and are stored in compressed format. I use the following to find specific log line zgrep searchString LargeLogFiles*.gz Typically this takes huge amount of ...
10
votes
2answers
1k views

Make grown extracted tar file small again

I packed and compressed a folder to a .tar.gz archive. After unpacking it was nearly twice as big. du -sh /path/to/old/folder = 263M du -sh /path/to/extracted/folder = 420M I searched a lot ...
6
votes
1answer
486 views

Is there a compression tool with an arbitrarily large dictionary?

I am looking for a compression tool with an arbitrarily large dictionary (and "block size"). Let me explain by way of examples. First let us create 32MB random data and then concatenate it to itself ...
0
votes
1answer
82 views

Need AIX command to extract a particular text file from a compressed file

I am looking for an AIX command to extract a particular text file from a compressed file. For example, my compressed file abc.gz contains millions of files with multiple sub directories. I need to ...
0
votes
1answer
144 views

How may I emulate the -R feature of “zip”, but in gzip and xz?

The program "zip" has a -R feature which allows one to zip all files with a certain name in a directory tree: zip -r v/s zip -R For example: zip -R bigfile "bigfile" Will zip all of the following: ...
0
votes
0answers
102 views

Command “wc -l” displays wrong count of lines, possibly because each line starts with a comma?

I have a czv.gz file and when issuing "less" command it looks like this COLUMN1,COLUMN2,COLUMN3 ,value1,value2,value3 ,value4,value5,value6 ... There are thousands of lines in a file but when I ...
2
votes
3answers
1k views

How to use zgrep to find out what line number or give some contextual info. surrounding a .gz file

In Debian you can use zgrep to grep through a gunzipped archive file. The reason for making a gunzip file is easy enough, files such as changelogs are vast which can be highly compressed. The issue is ...
2
votes
0answers
204 views

How does the tar flag --totals interact with the -z flag?

-z, --gzip filter the archive through gzip --totals[=SIGNAL] print total bytes after processing the archive; with an argument - print total bytes when this SIGNAL is delivered; Allowed ...
2
votes
1answer
3k views

Multithreaded xz, with gzip, pv, and pipes - is this the most efficient I can get?

I'm excited to learn that xz now supports multithreading: xz --threads=0 But now I want to utilise this as much as possible. For example, to recompress gzips as xz: gzip -d -k -c myfile.gz | pv | ...
0
votes
1answer
887 views

Can gzip compress application/octet-stream

Particularly in web, is it possible to compress application/octet-steam, I am serving video files from AWS to a web app and data transfer is very expensive at high scale
0
votes
1answer
365 views

“-bash: {}: No such file or directory” using find exec [duplicate]

I'm trying to run find . -name "binaries.tgz.*.gz" -exec gzip -d -k < {} \; (ultimately I'm trying to run find . -name "binaries.tgz.*.gz" -type f -exec gzip -d -k < {} \; | tar tzf - but I'm ...
1
vote
1answer
181 views

List contents of a tgz archive inside a gz archive

Bit of a weird one - I've got a honeypot running dionaea, which is a tool that consolidates any binaries that were uploaded to the device in single location (/data/dionaea/binaries). However, every ...
0
votes
0answers
257 views

Bash Script for Backing up/Gzip files with correct name

Having trouble forming a backup shell script for nested vm's There are multiple filenames (vm1, webserver, sshserver, etc.) with nothing in common other than .qcow2. I need to store just the ...
12
votes
5answers
3k views

Is gzip atomic?

Is gzip atomic? What happens if I stop the gzip process while it's in the middle of gzipping a file? If it's not atomic, and if I already pressed Ctrl+C on a gzip *.txt process, how do I safely ...
0
votes
0answers
74 views

In qemu using gzip return unexpected end of file gzip

When i download a file in /dev/sda1, and qemu -device file=/dev/sda1,format=raw to boot with it, gzip -d return unexpected end of file gzip. However, in my host machine, tar -xf it works fine. So ...

1
2 3 4 5
7