Linux untar11/27/2022 ![]() You can view the *.tar.gz file content before extracting as shown below. $ tar tvf archive_name.tar View the *.tar.gz file content without extracting using option tvzf You can view the *.tar file content before extracting as shown below. Linux untar archive#Listing an archive using tar command View the tar archive file content without extracting using option tvf Note: In all the above commands v is optional, which lists the file being processed. Use the option j for uncompressing a bzip2 tar archive. $ tar xvfz archive_ Extracting a bzipped tar archive ( *.tar.bz2 ) using option xvjf Use the option z for uncompressing a gzip tar archive. Extracting (untar) an archive using tar command Extract a *.tar file using option xvfĮxtract a tar file using option x as shown below: $ tar xvf archive_name.tarĮxtract a gzipped tar archive ( *.tar.gz ) using option xvzf Gzip vs bzip2: bzip2 takes more time to compress and decompress than gzip. ![]() i.e cvf for archive creation, cvfz for compressed gzip archive creation, cvfj for compressed bzip2 archive creation etc., For this method to work properly, don’t give – in front of the options.Ĭreating a bzipped tar archive using option cvjfĬreate a bzip2 tar archive as shown below: $ tar cvfj archive_2 dirname/ Note: I like to keep the ‘cvf’ (or tvf, or xvf) option unchanged for all archive creation (or view, or extract) and add additional option at the end, which is easier to remember. To use a gzip compression on the tar archive, use the z option as shown below. The above tar cvf option, does not provide any compression.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |