Linux gunzip command to parse gunzip extracted files

We have already discussed the usage of the gzip command under Linux. For beginners, the gzip utility is mainly used to compress or expand files. When decompressing, add the -d option after the gzip command. The usage example is as follows:

Gzip -d [compressed-file-name]

However, when decompressing or expanding gzip-created compressed files, there is another completely different tool available. The tool to talk about is gunzip. In this article, we will use some simple, easy-to-understand examples to explain the use of the gunzip command. All examples and guides in the article are tested in the Ubuntu 16.04 environment.

Linux gunzip command

We now know that compressed files can be unzipped with the gzip -d or gunzip command. The basic gunzip syntax is:

Gunzip [compressed-file-name]

The following Q&A example will show more clearly how the gunzip tool works:

Q1. How to use gunzip to extract compressed files?

Decompressing the command is very simple, just passing the compressed file name as a parameter to the gunzip command.

Gunzip [archive-name]

such as:

Gunzip file1.gz

Linux gunzip command to parse gunzip to extract files

How to use gunzip to extract compressed files?

Q2. How to make gunzip not delete the original compressed file?

As you have noticed, the gunzip command unpacks the original compressed file. If you want to keep the original compressed file, you can use the -c option.

Gunzip -c [archive-name] 》 [outputfile-name]

such as:

Gunzip -c file1.gz 》 file1

Linux gunzip command to parse gunzip to extract files

How to make gunzip not delete the original compressed file?

In this way, the original compressed file will not be deleted.

Q3. How to use gunzip to extract files to other paths?

We have already discussed the usage of the -c option in Q&A. Use gunzip to decompress the file to a different path outside the working directory, just add the absolute path of the target directory after the redirection operator.

Gunzip -c [compressed-file] [/complete/path/to/dest/dir/filename]

Examples are as follows:

Gunzip -c file1.gz ” /home/himanshu/file1

More information

The following excerpts from the gzip/gunzip man page will be useful to those who want to learn more.

Gunzip accepts a series of files on the command line, and starts each file with the correct magic number and suffixes it with a .gz, -gz, .z, -z, or _z (case-ignoring) zip file. Replace it with an uncompressed file and delete its original extension. Gunzip also recognizes compressed files with special extensions, such as .tgz and .taz, which are abbreviations for .tar.gz and .tar.Z. When compressing, gzip uses .tgz as an extension if necessary, instead of just clipping off the .tar suffix.

Gunzip can now extract files generated by gzip, zip, compress, and compress -H(pack). Gunzip automatically detects the input file format. When using the first two compression formats, gunzip checks the 32-bit Cyclic Redundancy Check (CRC). For the pack package, gunzip checks the compressed length. The standard compression format is not designed to allow compatibility testing. However, gunzip can sometimes detect bad .Z files. If you make a mistake when decompressing the .Z file, don't assume that the .Z file is correct because the standard decompression is not reported. This usually means that the standard decompression process does not detect its input, but instead produces an erroneous output directly. The SCO's compress-H format (lzh compression method) does not include a CRC, but it also allows some compatibility checking.

Conclusion

The basic usage of gunzip mentioned so far does not require too much learning curve. We have included almost all the knowledge that a beginner must use to begin using it. For more usage, see the man page.

HP Adapter

Laptop power adapter charger for HP:

Laptop Brand Power Adapter
EliteBook 8440p 6530b 18.5v 3.5a, 7450
Compaq 6500b 6530b 6535b 6700b 6730b 6735b 6736b 19v 4.74a, 7450
Pavilion DV4 DV5 DV6-1000 CQ60 CQ61 18.5v 3.5a, 7450
COMPAQ Mini 19v 1.58a, 4017
2710p 2730p 2740p 2740w 2760p 18.5v 3.5a, 7450
Pavilion DV4 DV5 DV5T DV6 G50 G60 G70 HDX16 18.5v 3.5a, 7450
dm4-1000 Dm4t-1000 Dm4t-1100 DV3-4000 CQ42 18.5v 3.5a, 7450
Compaq Presario CQ42 CQ57 CQ72 CQ56 CQ32 CQ32-101TX I84C 18.5v 3.5a, 7450
G62 Compaq Presario CQ42 CQ72 CQ62 CQ56 CQ32 593555-001 DM4 18.5v 3.5a, 7450
DV4 DV5 DV6-1000 DV6-1200 DV6-1300 18.5v 3.5a, 7450
DV4 SPARE 18.5v 3.5a, 7450
dv4-1120us dv4-1200 dv6-2150us dv6-2155dx dv6-1245dx 18.5v 3.5a, 7450
Pavilion DV1000 DV1100 D1200 DV1300 18.5v 3.5a, 4817
DV1000 M2000 18.5v 3.5a, 4817
EliteBook 2730p 2740 2760p Compaq 2710p nc6320 18.5v 3.5a, 7450
Compaq 320 321 325 326 420 620 621 421 19v 4.74a, 4817
Pavilion dv4000 dv4100 dv4300 dv4400 19v 4.74a, 4817
Compaq DV1000 G3000 G5000 18.5v 3.5a, 4817
dv4-5000 dv6-7000 dv7-7099 19v 4.74a, 4817
dv6-7200 dv7-7200 DV4-5000 DV7-7000 19v 4.74a, 4817
DV4 DV6 CQ60 CQ70 G50 G70 18.5v 3.5a, 7450
ProBook 4340s 4341s 19v 4.74a, 7450
Pavilion DV3 19v 4.74a, 7450
ProBook 4320s 4321s 4325s 4420s 4425s 4525s 18.5v 3.5a, 7450
dv2000 dv6400 dv6700 dv6800 dv6900 A900 V6400 18.5v 3.5a, 4817
Compaq 420 421 425 4320t 620 625 320 321 325 326 621 18.5v 3.5a, 7450
ProBook 6440b 6445b 6450b 6540b 6545b 6550b 6555b 19v 4.74a, 7450
Pavillion DV7 19.5v 4.62a, 7450
G42 G72 G32 DV7-4000 DV6-6000 DV5-2000 19.5v 4.62a, 7450
Presario CQ32 CQ42 CQ43 CQ56 CQ62 CQ72 19v 4.74a, 7450
Pavilion DV6 DV6-3000 DM4-1000 Envy 15 17 G4 G6 G7-1000 19.5v 4.62a, 7450
avilion dm3 dm3-dm3t-1000 CTO dm3-1000 dv4-3100 19.5v 3.33a, 4817
DV4 DV5 G50 G60 G61 G70 G71 HDX16 19v 4.74a, 7450
CQ40 CQ50 CQ60 CQ61 CQ70 CQ71 DV4 19v 4.74a, 7450
CQ60 CQ61 CQ40 CQ41 CQ45 CQ60 G60 G70 19v 4.74a, 7450
Pavilion dm3 CTO dm3-1000 dv4-3100 19v 4.74a, 7450
Compaq 6520 6520P 6520S 515 516 19v 4.74a, 7450
2000-425NR 19v 4.74a, 7450

Our service:

Stable output and high charging efficiency.

Elegant outlook design as original one, touch smoothly and comfortable.

Original charger is good, but as a replacement, our product has more reasonable price when your original charger is broken.

And, the market of the replacement adapters becomes bigger and bigger. People would rather buy a copy one then the original because of the price.

But at the same time, people worry about that they will buy something defective. So the problem comes, how to buy a good quality one with a good price?

As a professional power adapter manufacturer, we have excellent R&D team, skilled staffs and responsible after-sale service. All your benefits can be under protected after you buy products for our company.

Our certificates :ISO9001:2008 & ISO14001:2004 , CCC , CE , FCC , ROHS.

All our products has 1 year warranty. In other words, if you get the dad products which are not damaged physically from us in one year, we will replace you the new one or the whole bulk order.

Laptop Adapter For Hp,Hp Laptop Adapter,Charger For Hp,Power Supply For Hp

Shenzhen Waweis Technology Co., Ltd. , https://www.waweisasdapter.com