tar - Knowledge Base Archives - Hivelocity Hosting https://www.hivelocity.net/kb/tag/tar/ Dedicated Servers, Private Cloud & Colocation Wed, 06 Dec 2023 16:46:32 +0000 en-US hourly 1 https://wordpress.org/?v=6.6 How to use tar command on linux server? https://www.hivelocity.net/kb/how-to-use-tar-command-on-linux-server/ https://www.hivelocity.net/kb/how-to-use-tar-command-on-linux-server/#respond Wed, 30 Jan 2013 13:52:42 +0000 https://kb.hivelocity.net/?p=10985 “Untar” a file If you are working with example.tar file, you can extract the files from it using:   tar xvf example.tar   If you are working with gzipped(example.tar.gz), you can extract the files from it using:   tar xvfz example.tar.gz   If you have example.tgz, you can extract the files from it using:   …

How to use tar command on linux server? Read More »

The post How to use tar command on linux server? appeared first on Hivelocity Hosting.

]]>
“Untar” a file
If you are working with example.tar file, you can extract the files from it using:

 

tar xvf example.tar

 

If you are working with gzipped(example.tar.gz), you can extract the files from it using:

 

tar xvfz example.tar.gz

 

If you have example.tgz, you can extract the files from it using:

 

tar xzvf example.tgz

If the tarball has been compressed with bzip2(example.tar.bz2), then you will need to

have bzip2 installed. (If all is well and bzip2 is installed, you can extract the files from it

using:
tar yxf example.tar.bz2

Sometimes you only want to extract certain directories from the tarball.

An example of doing so would be:

tar xvzf example.tar.gz */DIRECTORY_YOU_WANT_REPLACES_THIS_TEXT/*

 

If you would like to see what is inside a tarball, you can use the command:

tar tvf example.tar

 

If you would like to see what is inside a gzip’d tarball, you can use the command:

tar tzf example.tar.gz

The post How to use tar command on linux server? appeared first on Hivelocity Hosting.

]]>
https://www.hivelocity.net/kb/how-to-use-tar-command-on-linux-server/feed/ 0