Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

HTTP File Server or HFS is a small utility which allows one to share files with others by creating http links for every file

Now when I want to download multiple files, the software creates a "tar" file with the selected files

Now my question is, when I'm creating a tar file, are the files duplicated? Do I need double the space?

For example, when I'm zipping 3 files of 1 MB each into an archive, a new file is created of say 2 MB which contains the original files. So total space required is (3 + 2) MB = 5 MB

Does the same thing happen when creating tar files?

share|improve this question
up vote 0 down vote accepted

Tar is the sum of your files, without use any compress. So, you obtain the sum size of the three files (and a bit more for tar control). Usually a zip file will download more fast for being more little on space, but that's depend of the type of files. Already compressed movie , images and such media files not reduce much his size on compress.

share|improve this answer
So therefore, it is just a container but it makes copies of the original files. Am I correct? – xavier666 Jan 28 '14 at 15:26
@xavier666 Exactly. Usually the tar files, for put more info here, are used with another extension "tar.gz" or "tar.bz2" wich is a tar file, but passed by a compressor, making one "zip, rar..." effect. – gabrign Jan 28 '14 at 15:32
Because you mention HFS, use the tar distributed with OSX, and not one you may add on with, say brew, macports, or fink. I believe those that are not native to OSX fail to archive the ACL, which could lead to issues down the road, especially with security. So if this concerns you, do a which tar to verify that yours comes from /usr/bin and not, for instance /sw/bin. – Bill McCloskey Jan 28 '14 at 16:01
...the implication and by inference, also, is that the tar distributed with OSX should generate a tar file which is slightly larger than the aforementioned, because it does include the ACL. – Bill McCloskey Jan 28 '14 at 16:25
Tape Archive. Contains headers to separate the files and the file contents. Think of it as a big concatenate with separators. – Fiasco Labs Jan 28 '14 at 17:48

when I'm creating a tar file, are the files duplicated?

Yes, 10 1 meg files in a tar will be 10 megs

Do I need double the space?

Yes, and no depending on how you want to handle it.

I have some questions that could help

What OS are you running?

What are the contents of the files you want to compress?

What are your ideal requirements?

Are you archiving data or just looking for an easier mode of transport?

If transporting then is it to physical media or over the network / Internet?

It sounds like you are just missing the compression flag if it's not already compressed.

from a terminal run "man tar" and or "info tar" to display the manual or info pages pages for the tar command.

adding either flag will probably do what you want to do.

-j will use bzip2 compression

-z will use gzip compression

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .