Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Tar (computing)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Suffixes for compressed files== ''tar'' archive files usually have the file suffix ''.tar'' (e.g. ''somefile.tar''). A tar archive file contains uncompressed byte streams of the files which it contains. To achieve archive compression, a variety of [[data compression|compression]] programs are available, such as [[gzip]], [[bzip2]], [[XZ Utils|xz]], [[lzip]], [[Lempel–Ziv–Markov chain algorithm|lzma]], [[zstd]], or [[compress]], which compress the entire tar archive. Typically, the compressed form of the archive receives a filename by appending the format-specific compressor suffix to the archive file name. For example, a tar archive ''archive.tar'', is named ''archive.tar.gz'', when it is compressed by gzip. Popular tar programs like the [[Berkeley Software Distribution|BSD]] and [[GNU]] versions of tar support the [[Command-line interface|command-line options]] ''Z'' (compress), ''z'' (gzip), and ''j'' (bzip2) to compress or decompress the archive file upon creation or unpacking. Relatively recent additions include ''--lzma'' ([[Lempel–Ziv–Markov chain algorithm|LZMA]]), ''--lzop'' ([[lzop]]), ''--xz'' or ''J'' ([[XZ Utils|xz]]), ''--lzip'' (lzip), and ''--zstd''.<ref>{{cite web | url = https://lists.gnu.org/archive/html/info-gnu/2019-01/msg00001.html | title = tar-1.31 released [stable] | last = Poznyakoff | first = Sergey | date = 2019-01-02 | website = GNU mailing lists | access-date = 2019-08-06}}</ref> The decompression of these formats is handled automatically if supported filename extensions are used, and compression is handled automatically using the same filename extensions if the option ''--auto-compress'' (short form ''-a'') is passed to an applicable version of GNU tar.<ref name="gnu.org"/> BSD tar detects an even wider range of compressors ([[lrzip]], [[LZ4 (compression algorithm)|lz4]]), using not the filename but the data within.<ref>{{man|1|tar|FreeBSD}}</ref> Unrecognized formats are to be manually compressed or decompressed by piping. [[MS-DOS]]'s [[8.3 filename]] limitations resulted in additional conventions for naming compressed tar archives. However, this practice has declined with [[File Allocation Table|FAT]] now offering [[long filename]]s. [[File:Targzip.svg|thumb|upright=1.2|Tar archiving is often used together with a compression method, such as [[gzip]], to create a compressed archive. As shown, the combination of the files in the archive is compressed as one unit.]] {| class="wikitable" |+ File suffix equivalents<ref name="gnu.org"/> !Compressor ! Long !! Short |- |[[bzip2]] | .tar.bz2 || .tb2, .tbz, .tbz2, .tz2 |- |[[gzip]] | .tar.gz || .taz, .tgz |- |[[lzip]] | .tar.lz || |- |[[Lempel–Ziv–Markov chain algorithm|lzma]] | .tar.lzma || .tlz |- |[[lzop]] | .tar.lzo || |- |[[XZ Utils|xz]] | .tar.xz || .txz |- |[[compress]] | .tar.Z || .tZ, .taZ |- |[[Zstandard|zstd]] | .tar.zst || .tzst |}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)