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. v – verbosely list files which are processed.Ĭreating a tar gzipped archive using option cvzf.This is the basic command to create a tar archive. Creating an archive using tar command Creating an uncompressed tar archive using option cvf In this article, let us review various tar examples including how to create tar archives (with gzip and bzip compression), extract a single file or directory, view tar archive contents, validate the integrity of tar archives, finding out the difference between tar archive and file system, estimate the size of the tar archives before creating it etc.,ġ. Understanding various tar command options will help you master the archive file manipulation. On Unix platform, tar command is the primary archiving utility.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |