tar (computing)

« Back to Glossary Index

History and Evolution of Tar
– Tar was first introduced in Version 7 Unix in January 1979, replacing the tp program.
– The file structure for tar was standardized in POSIX.1-1988 and later POSIX.1-2001.
– Tar command was abandoned in POSIX.1-2001 in favor of pax command.
– Unix-like operating systems usually include tools to support tar files.
– Tar has been ported to the IBM i operating system.

Rationale and File Format of Tar
– Tar writes data in records of many 512B blocks to optimize writing time.
– The user can specify a blocking factor, which is the number of blocks per record.
– Tar formats waste less space on tape drives that read and write variable-length data blocks.
– Writing one large block takes less time than many small blocks.
– Tar formats are supported by most modern file archiving systems.
– There are multiple tar file formats, including ustar, pax, and GNU tar.
– Tar archives consist of file objects preceded by a 512-byte header record.
– File data is written unaltered, but its length is rounded up to a multiple of 512 bytes.
– Modern tar implementations fill extra space with zeros.
– The end of an archive is marked by consecutive zero-filled records.
– The file header record contains metadata about a file.
– The header record is encoded in ASCII for portability across different architectures.
– The original Unix tar format defines fields for file name, file mode, owners’ numeric user ID, groups’ numeric user ID, and file size.
– Numeric values are encoded in octal numbers using ASCII digits.
– The checksum is calculated by taking the sum of the unsigned byte values of the header record.

UStar Format and POSIX.1-2001/pax
– UStar is the Unix Standard TAR format introduced by the POSIX IEEE P1003.1 standard in 1988.
– UStar format allows for longer file names and stores additional information about each file.
– Older tar programs ignore the extra information, while newer programs test for the presence of the ‘ustar’ string.
– The maximum filename size in UStar format is 256, split between a path filename prefix and the filename itself.
– UStar format includes global extended headers, extended headers for the next file, and vendor-specific extensions.
– Sun proposed a method for adding extensions to the tar format in 1997.
– The method was later accepted for the POSIX.1-2001 standard.
– The format is known as extended tar format or pax format.
– The new tar format allows users to add vendor-tagged vendor-specific enhancements.
– The POSIX standard defines tags such as atime, mtime, path, linkpath, uname, gname, size, uid, gid, and character set definitions.

Uses and Command Syntax of Tar
– The tar format is extensively used for open-source software distribution.
– *NIX distributions utilize it for various source and binary package distribution mechanisms.
– Most software source code is made available in compressed tar archives.
– Tar is commonly used for backup and archiving purposes.
– It is also used for creating and extracting archives in command line operations.
– Basic options for tar include create, auto-compress, append, extract, file, list, and verbose.
– The -c or –create option is used to create a new archive.
– The -a or –auto-compress option automatically compresses the archive based on the file name extension.
– The -r or –append option appends files to an existing archive.
– The -x or –extract option extracts files from an archive.
– To create an archive file named archive.tar from README.txt and the src directory: tar -cvf archive.tar README.txt src
– To extract the contents of archive.tar into the current directory: tar -xvf archive.tar
– To create an archive file named archive.tar.gz from README.txt and the src directory and compress it with gzip: tar -cavf archive.tar.gz README.txt src
– To extract the contents of archive.tar.gz into the current directory: tar -xvf archive.tar.gz

Key Implementations and Limitations of Tar
– Many older tar implementations do not record or restore extended attributes or access-control lists.
– Star introduced support for ACLs and extended attributes through its own tags for POSIX.1-2001 pax.
– More recent versions of GNU tar support Linux extended attributes.
– Other formats have been created to address the limitations of tar.
– The original tar format has design features that are considered dated.
– Solaris tar is based on Unix V7 tar and is the default on Solaris OS.
– GNU tar is the default on most Linux distributions and supports various formats.
– FreeBSD tar is the default on BSD-based operating systems and can extract from multiple formats.
– Schily tar, also known as star, has popular extensions and was developed in 1982.
– Python tarfile module supports multiple formats and has been available since 2003.
– Tar archive files have the suffix ‘.tar’ and can be compressed using gzip, bzip2, xz, and others.
– The compressed form of the archive receives a filename by appending the format-specific compressor suffix.
– BSD tar detects a wide range of compressors using the data within the file, not the filename.
– Unrecognized formats need manual compression or decompression by piping.
– MS-DOS’s 8.3 filename limitations resulted in additional conventions for naming compressed tar archives.
– Tar has a history of incompatibilities, known as the tar wars.
– Most tar implementations can also read and create cpio and pax formats.
– Solaris tar is based on the original Unix V7 tar.
– GNU tar is based on the public domain implementation pdtar.
– FreeBSD tar has become the default on most BSD-based operating systems.

tar (computing) (Wikipedia)

In computing, tar is a computer software utility for collecting many files into one archive file, often referred to as a tarball, for distribution or backup purposes. The name is derived from "tape archive", as it was originally developed to write data to sequential I/O devices with no file system of their own, such as devices that use magnetic tape. The archive data sets created by tar contain various file system parameters, such as name, timestamps, ownership, file-access permissions, and directory organization. POSIX abandoned tar in favor of pax, yet tar sees continued widespread use.

tar
Original author(s)AT&T Bell Laboratories
Developer(s)Various open-source and commercial developers
Initial releaseJanuary 1979; 45 years ago (1979-01)
Stable release(s)
BSD tar3.7.2 / 2023-09-12
GNU tar1.35 Edit this on Wikidata / 2023-07-18
pdtar1986-10-29 / 1986-10-29
Plan 9 tar? / ?
star2023-09-28 / 2023-09-28
Written inpdtar, star, Plan 9, GNU: C
Operating systemUnix, Unix-like, Plan 9, Microsoft Windows, IBM i
PlatformCross-platform
TypeCommand
LicenseBSD tar: BSD-2-Clause
GNU tar: GPL-3.0-or-later
pdtar: Public domain
Plan 9: MIT
star: CDDL-1.0
tar
Filename extension
.tar
Internet media type
application/x-tar
Uniform Type Identifier (UTI)public.tar-archive
Magic numberu s t a r \0 0 0  at byte offset 257 (for POSIX versions)

u s t a r \040 \040 \0  (for old GNU tar format)

absent in pre-POSIX versions
Latest release
various
various
Type of formatFile archiver
StandardPOSIX since POSIX.1, presently in the definition of pax[1]
Open format?Yes
« Back to Glossary Index

Submit your RFP

We can't wait to read about your project. Use the form below to submit your RFP!

Gabrielle Buff
Gabrielle Buff

Just left us a 5 star review

Great customer service and was able to walk us through the various options available to us in a way that made sense. Would definitely recommend!

Stoute Web Solutions has been a valuable resource for our business. Their attention to detail, expertise, and willingness to help at a moment's notice make them an essential support system for us.

Paul and the team are very professional, courteous, and efficient. They always respond immediately even to my minute concerns. Also, their SEO consultation is superb. These are good people!

Paul Stoute & his team are top notch! You will not find a more honest, hard working group whose focus is the success of your business. If you’re ready to work with the best to create the best for your business, go Stoute Web Solutions; you’ll definitely be glad you did!

Wonderful people that understand our needs and make it happen!

Paul is the absolute best! Always there with solutions in high pressure situations. A steady hand; always there when needed; I would recommend Paul to anyone!

facebook
Vince Fogliani
recommends

The team over at Stoute web solutions set my business up with a fantastic new website, could not be happier

facebook
Steve Sacre
recommends

If You are looking for Website design & creativity look no further. Paul & his team are the epitome of excellence.Don't take my word just refer to my website "stevestours.net"that Stoute Web Solutions created.This should convince anyone that You have finally found Your perfect fit

facebook
Jamie Hill
recommends

Paul and the team at Stoute Web are amazing. They are super fast to answer questions. Super easy to work with, and knows their stuff. 10,000 stars.

Paul and the team from Stoute Web solutions are awesome to work with. They're super intuitive on what best suits your needs and the end product is even better. We will be using them exclusively for our web design and hosting.

facebook
Dean Eardley
recommends

Beautifully functional websites from professional, knowledgeable team.

Along with hosting most of my url's Paul's business has helped me with website development, graphic design and even a really cool back end database app! I highly recommend him as your 360 solution to making your business more visible in today's social media driven marketplace.

I hate dealing with domain/site hosts. After terrible service for over a decade from Dreamhost, I was desperate to find a new one. I was lucky enough to win...

Paul Stoute has been extremely helpful in helping me choose the best package to suite my needs. Any time I had a technical issue he was there to help me through it. Superb customer service at a great value. I would recommend his services to anyone that wants a hassle free and quality experience for their website needs.

Paul is the BEST! I am a current customer and happy to say he has never let me down. Always responds quickly and if he cant fix the issue right away, if available, he provides you a temporary work around while researching the correct fix! Thanks for being an honest and great company!!

Paul Stoute is absolutely wonderful. Paul always responds to my calls and emails right away. He is truly the backbone of my business. From my fantastic website to popping right up on Google when people search for me and designing my business cards, Paul has been there every step of the way. I would recommend this company to anyone.

I can't say enough great things about Green Tie Hosting. Paul was wonderful in helping me get my website up and running quickly. I have stayed with Green...