Skip to main content

Questions tagged [gunzip]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
1k views

How to extract .gtar file?

I have a .gtar file, I wanted to extract it, but it is not getting extracted. Below are the methods I have tried with its output. I supposed to be contained bunch of text files. $ gtar -xf file.gtar ...
Subramanya Krishna's user avatar
1 vote
2 answers
133 views

Gunzip all the files with a given extension in a different folder

I have a folder with 28 gz files with the extension .gz and 28 files with the extension .gz.bam. I would like to unzip all the 28 .gz files and send them to another folder. I was doing one by one as ...
RoyBatty279's user avatar
3 votes
2 answers
992 views

gunzip multiple gz files with same compressed file name in multiple folders

I have a directory where there are multiple folders, each folder contains multiple .gz files with the same zipped file name "spark.log". How can I unzip all of them at once and rename them ...
sojim2's user avatar
  • 143
1 vote
1 answer
764 views

How Can I Pipe the Sed Command?

I have a bash script that imports wordpress dbs for me pretty reliably, but one of my sites came from a former wordpress multisite, therefore the database includes DEFINERS within the database that ...
Time-Bandit's user avatar
0 votes
0 answers
199 views

unzip: can't set permissions of directory 'folder' : Invalid argument

I have the below script to unzip a .zip file and print out a .txt file of the files in the .zip but when I run the script, I get this output: "unzip: can't set permissions of directory 'folder' : ...
Shortytot's user avatar
0 votes
3 answers
1k views

Gunzip extract *.gz files to another location

This code was written to extract multiple .tar files to another location and woks fine ls -1 ${short_filename} \ | while read file; do \ tar -zxvf "$file" -C ${pentaho_temp_path}/${...
Wessley's user avatar
  • 21
0 votes
0 answers
948 views

Unable to decompress gzip file ("not in gzip format")

I've been tasked with diagnosing an issue with a webpage, and I've been able to trace the issue back to a gzip'ed JavaScript file, jquery.min.js.gz. To view the code, I've downloaded and attempted to ...
PerplexedDimension's user avatar
0 votes
1 answer
428 views

For all zips, and unzip in working directory and maintains its structure

With this command find . -name '*.zip' -exec unzip '{}' ';' we find all zip files under . (directory), then unzip them into the current working directory, However, the structure is gone. /backUp/...
Maxfield's user avatar
  • 161
1 vote
1 answer
664 views

What should dirname and basename be in this command?

With this command, we can recursively unzip archives in a directory and its sub-directories and remain its structure in the current working directory. find ../backUp/ -name "*.zip" | ...
Maxfield's user avatar
  • 161
0 votes
1 answer
81 views

Getting rid of spurious directories with tar -xzvf, while gunzipping

I want to trim the path of the gunzipped tarball so that some "spurious" leading directories are excluded. Let me explain with an example. I have the following directory structure, as ...
Xin's user avatar
  • 3
0 votes
2 answers
13k views

Silence the `unknown suffix -- ignored` error

In a directory with many subdirectories, I have some .gz archives. I want to recursively extract all these archives using gunzip. Hence, I use: gunzip -r myDir However, this command exits with "...
Dr. Strangelove's user avatar
0 votes
0 answers
286 views

Trying to append a file to a tarball through a pipe

I am trying to execute a simple pipeline which should gunzip a file and send the result to stdout. This is ten piped into a tar command which to my knowledge should append the file I specify. I use a ...
nrmad's user avatar
  • 115
0 votes
1 answer
355 views

List only files and not directories in archive

I have a zip achieve like below $ unzip -l 5124.zip Archive: 5124.zip Length Date Time Name --------- ---------- ----- ---- 0 01-13-2021 09:22 u/ 0 01-13-2021 09:...
Ashar's user avatar
  • 511
0 votes
2 answers
2k 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 ...
Code-x Go's user avatar
0 votes
1 answer
3k views

"xz : (stdout) : Write error: File too large" while writing a tar archive

I wanted to compress a directory whit size of about 25 GB to .tar.xz format using following command: tar --xz --create --verbose --file myArchive.tar.xz /patch/to/my/dir but got these error lines: xz:...
mmj's user avatar
  • 109
1 vote
1 answer
618 views

how to fix "tar: Cannot verify compressed archives" error?

I wanted to compress a directory into .tar.xz format and verify it after writing so I wrote a command like this: tar --xz --create --verbose --verify --file myArchive.tar.xz /patch/to/my/dir but it ...
mmj's user avatar
  • 109
0 votes
1 answer
344 views

Trouble with unzipping files - Argument list to long [duplicate]

I have to gunzip all the files in folder (say Folder A), which has multiple folder hierarchy with files in each of them. This Folder A is present in thousands of folders in a directory. I need to ...
Chakrakeerthi Reddy's user avatar
0 votes
0 answers
173 views

How to unzip latest .gz file on unix serve and then re-direct the filename along with path into another file?

I have some 10 files of particular pattern coming every day on my server in "tmp" directory like below: abc1.px.20200820034058.gz abc2.px.20200820062036.gz mno.px.20200819192323.gz abc1.px ...
komal mishra's user avatar
2 votes
1 answer
929 views

GNU parallel + gunzip (or 7z, or bsdtar, or unzip): extract every "archivename.zip" into (to-be-created) its "archivename" subfolder

As in title. I've got a lot of ZIP archives that I want to extract. All archives have their own unique name. All archives contain files only (inside archives there are NOT folder(s) at all: no ...
T. Caio's user avatar
  • 129
-2 votes
2 answers
73 views

searching for a number(eg. mobile number) in more than 1000 gzip files? [closed]

I have more than 1500 gzip files and now I have to search for a particular number (eg.mobile number) in those 1500 gzip files. Which command or script should I use to get these problem solved?
yash singh's user avatar
0 votes
0 answers
593 views

Shell script to zcat and gunzip multiple files

I have the following files SiteTraffic_1141875176444311430_20191120.json.gz0000.gz SiteTraffic_1141875176444311430_20191120.json.gz0001.gz SiteTraffic_1141875176444311430_20191120.json.gz0002.gz ...
Dhanushka Amarakoon's user avatar
0 votes
0 answers
409 views

corrupt tar.gz archive

I'm new here and I want to ask something maybe you can help me. I wanted to service my NAS and I had to download all the data that I had on it, so what I did is downloaded whole data trough webbrowser ...
fortyknoxy's user avatar
2 votes
2 answers
12k views

UNZIP: Cannot find or open filename.zip Error

I have a zipped file (using Winrar) and the size of it is more than 4GB from Windows 10. I've already dumped the file in Unix Server and I want to unzip the file but the error always shows: Code: ...
Ace's user avatar
  • 65
1 vote
1 answer
2k views

Unzipping the parent directory contents ignoring sub-directory and their contents

I am unzipping the .zip file. I'm able to do so but my requirement to extract only the parent folder data ignoring any sub directory and their contents. Below is the name format of zip file. ...
sam's user avatar
  • 181
0 votes
1 answer
4k views

tar + compress folder to tar.gz and removed the folder

by the following way we tar the folder presto-server-0.210 to file tar -czvf presto-server-archive.tar.gz presto-server-0.210 so after we tar the folder , folder still exists is it possible to use ...
yael's user avatar
  • 13.5k
-1 votes
2 answers
498 views

gunzip on all present files safety regarding memory

I want to look for the presence of a string on all gziped files on server. I am afraid if I run something like gunzip -c *.gz | grep "string to be searched" server get overloaded with cache for ...
Curcuma_'s user avatar
  • 143
4 votes
2 answers
290 views

gunzip on Embedded machine

I'm using BusyBox 1.24.1 on my Embedded Linux machine (with kernel v3.10.31) and I get behavior I can't understand when unzipping files.  The gunzip command (often, but not always) fails, with no ...
Stric Matic's user avatar
3 votes
1 answer
2k views

How to maintain sort order with xargs and gunzip

I'm attempting to extract the contents of some files by alphabetical (which in this case also means date and iteration) order and when I test the process first with ls: $ find /opt/minecraft/wonders/...
Jesse Yishai's user avatar
4 votes
1 answer
22k views

Unzipping a .gz file to get a text file but getting a binary file? [closed]

I have a .gz file called document.txt.gz file. It is supposed to be a text file which got compressed to a gzip file. When I uncompress, I am getting a corrupt file. I ran the following commands: $ ...
Morpheus's user avatar
  • 163
0 votes
3 answers
103 views

Process a text file and a gunzipped text file in single command [duplicate]

I have a use-case to process following file types: 1 - mylog_1.log 2 - mylog_2.log.gz I have to run two different text processing commands on each of them as follows: cat mylog_1.log | grep text | ...
GC 13's user avatar
  • 606
0 votes
1 answer
2k views

how to list content of zip file

I created a zip file which was very large in size, I then split the main zip into chunks of 3GB. I used the command zip test.zip --out new_test.zip -s 3300m which resulted into 3 files test.zip ...
sanees's user avatar
  • 1
0 votes
2 answers
563 views

gunzip and create directories following the name of the zip file

I have the following gzip file: hdf5-1.8.18.tar.gz. When I unzip the file with the following command: gunzip < hdf5-1.8.18.tar.gz | tar xf - It unzips into the created following directory: hdf5-1....
steve's user avatar
  • 548
251 votes
2 answers
905k views

Unzipping a .gz file without removing the gzipped file [duplicate]

I have a file file.gz, when I try to unzip this file by using gunzip file.gz, it unzipped the file but only contains extracted and removes the file.gz file. How can I unzip by keeping both unzipped ...
jack's user avatar
  • 3,913