3 ms·
tar c * > ../foo.tar; gzip ../foo.tar (you don't need anything else)
by dvh 12y ago
tar c * > ../foo.tar; gzip ../foo.tar
(you don't need anything else)
- rascul 12y agotar czf ../foo.tar.gz * (GNU tar can do it all in one command)
- feld 12y agoBoth of you are creating a tarbomb and should be ashamed http://en.wikipedia.org/wiki/Tar_%28computing%29#Tarbomb http://en.wikipedia.org/wiki/Tar_%28computing%29#Tarbomb
- rascul 12y agoI agree, but that's how the original was
- LukeShu 12y agoI think OP's point is that instead of learning the options of tar, you can just learn the basics, and use unix composibility to do the more complex things without learning more.
- belovedeagle 12y agoA significant improvement is to instead use tar -c files | gzip > ../foo.tgz No messing around with flags, just a single one saying that you want to create an archive rather than extract one. No messing around with filename parameters—that's what the shell is there for.