![]() ![]() ![]() Generally it knows about the structure and state of an archived file system and can alter it or read from it more or less like a real live file system. Tar can do things like instruct some (nominally human) operator to change tapes or spool forward/back to the correct range and location on many meters "tape".Īll of this functionality is still useful, even if the actual hardware has long gone, the concepts are still used. Its a classic tool that evolved in the far distant heroic past, when 64K was a lot of memory and streaming (character by character) based storage was a norm. So you can add ,extract, subtract, update the contents of the archive. Tar stores and extracts files from a tape or disk archive. Tar is for archiving (Tape Archiver) it does way more than compress a glob of files. Perhaps your not fully understanding what tar is about ? They only do the "same thing" in some limited cases. Well tar predates bzip and I think even the original zip. perhaps the most successful and robust one.Īlso, why have 2 things which does the same thing? I was wondering if there was a difference between using tar to createīzip2 is a compression tool. However, your mileage may definitely vary. The built-in options provide a high level of convenience and a reasonable trade-off between speed and compression. Unless space is at an extreme premium, you're generally better off using the built-in compression options for simplicity's sake. A good example would be lrzip, which can take advantage of redundancies throughout the entire tar archive, rather than just redundancies within the current data chunk. In addition, operations that can use the entire tarball for input might be able to take advantage of compression opportunities beyond the standard-sized chunks available through streaming. ![]() All tar compression supported by command-line options operates on chunks of streamed data, which doesn't matter much in the average case, but external compression may be able to offer better compression even with the same algorithm.įor example, using -bzip2 uses a pre-defined compression level, while running bzip2 on an uncompressed tarball gives you the opportunity to tune various compression parameters and perhaps achieve tighter compression. 8.1.1 Creating and Reading Compressed Archives Sound information on using the auto-compress options with tar as well as the possibilities for accomplishing the same goal with a more manual and flexible option.GNU tar supports the -bzip2 option, which lets you stream the tar file through bzip2 before writing the resultant file out to disk.Recognised suffixes (and their attendant compressing applications) are: Use archive suffix to determine the compression program. You need the archive name immediately after the -f option, the correct sequence being: tar -c įor a more flexible command line (particularly if you wanted to use other compression utilities apart from gzip with tar) you could omit the -z option and use -a or -auto-compress option to allow tar to automatically decide which compressor to use based on the archive suffix: -a, -auto-compress Arguments supply the names of the files to be archived.ĭirectories are archived recursively, unless the -no-recursion option isĪlthough this can be turned off by using the -no-recursion option. Recursion is the default, from the tar man pages: -c, -createĬreate a new archive. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |