Server Fault is a question and answer site for system and network administrators. 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

I'm trying to tar up a directory that has about 3M tiny files in it. Tar is chugging along, but I'm thinking its going to take longer than I can wait.

I'm wondering if telling tar to not store metadata (owner, group, perms) would reduce the churn on reading and re-reading this huge directory and maybe speed things up, and if there is a tar switch that does this.

My initial perusal of the man page only gets me something like --no-xattrs, which looks like a start, but I was hoping someone had some specific knowledge.

share|improve this question

I've got to think that the performance of the underlying filesystem probably has a lot to do with what you're getting out of tar.

What is the filesystem you're reading from, and how tiny are the files?

share|improve this answer

You might try adding mbuffer between your tar and your output file. I just learned about it, and it did wonders for my transfer.

e.g. tar -c dir | mbuffer > output.tar

Might not help if the slowness really is a a result of disk or filesystem limitations.

share|improve this answer
How do you envision this being faster than tar -cf output.tar dir ? – sciurus Oct 14 '11 at 2:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.