Uncompress tar.gz file

LinuxUbuntuDebian

Linux Problem Overview


With the usage of wget command line I got a tar.gz file. I downloaded it in the root@raspberrypi. Is there any way to uncompress it in the /usr/src folder?

Linux Solutions


Solution 1 - Linux

Use -C option of tar:

tar zxvf <yourfile>.tar.gz -C /usr/src/

and then, the content of the tar should be in:

/usr/src/<yourfile>

Solution 2 - Linux

Try this:

tar -zxvf file.tar.gz

Solution 3 - Linux

gunzip <filename>

then

tar -xvf <tar-file-name>
 

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questiondali1985View Question on Stackoverflow
Solution 1 - LinuxqingchenView Answer on Stackoverflow
Solution 2 - LinuxdratewkaView Answer on Stackoverflow
Solution 3 - LinuxSatyaView Answer on Stackoverflow