Hacker News new | ask | show | jobs
by godshatter 1184 days ago
For the simple tar command, I've read somewhere that it's best to not encode the output using the tar command itself (i.e. tar -cvf blah; zip blah instead of tar -cvzf blah), but I'm not sure what the reasoning is. Has anyone else heard this? Something to do with passing files between systems that may not the right encoding software maybe?
1 comments

I think it would only makes sense if the target system on which the script may run has `zip` but not a version of `tar` supporting the `-z` option. That's certainly unlikely to ever happen.

There's also `tar -cvf - | zip blah.zip -` with the idea that it's a poor man's way to parallelize the `tar` and `zip` processes but I don't think it makes a real difference in recent implementations of `tar`. At least in a couple of tests I've just run, it's just as fast.