![]() tbz extension, it indicates you used the -j flag while creating an archive with the tar command.Īnd in both cases, you can untar the file by using the -j flag with other options as shown: tar -xjvf 2 ![]() tar.bz2 extension, it clearly means the tar file was later compressed with the bzip2 command. Here, the -z flag indicates you want to work with the compressed file by gzip and when paired with the -x, it will extract the given file.įor example, here, I have untared the file: tar -xzvf How to untar. tgz files, all you need to do is add the -z flag to the previous command as shown: tar -xzvf tgz extension when you used the gzip command over the existing tar file or used the -z option while creating the tar file.Īnd to untar. Similarly, if you want to extract the file somewhere else, you'd have to use the -C flag and provide the path to the tar command as shown: tar -xvfC File.tar -C /path/to/extract How to untar. -f is used to specify the file which needs to be extractedįor example, here, I have extracted a Fedora.tar file: tar -xvf Fedora.tarĪnd as you can see, the file is extracted successfully and here I have used the tree command to show the file contents of the directory.-v gives the verbose output of what is being done by the command.-x is used to specify user wants to extract the file.tar extension when you use the tar command to create an archive from one or multiple files.Īnd to extract the tar file, all you need to do is use the -xvf option with the tar command and append the filename as shown: tar -xvf file.tar In this tutorial, I will walk you through how you can untar the following file types: So in this tutorial, I will walk you through how you can untar files that were created with different utilities. For example, using gzip command, you can create. Or you may have used the tar command to compress files in the past and now want to extract them.īut several types of tar files can be created with different utilities. While installing packages from the source, you are more likely to get the file in the.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |