Search code examples
gziptarxz

Do you need to use tar before using xz/gz when distributing software?


Most software, when not in a package such as .deb, comes in .tar.gz or .tar.xz. Is it necessary to use tar before using xz or gz? What are the advantages of doing that?


Solution

  • If you want to combine several files - use tar and then, optionally, compress your tar archive with gzip or another tool. If you have 1 file only - using tar is meaningless, just compress the file with gzip