3 ms·
That's true, and it's nice that it works, but it's just more magic information you have to memorize about tar. And it works one way but not the other. What is t
by OskarS 7y ago
That's true, and it's nice that it works, but it's just more magic information you have to memorize about tar. And it works one way but not the other. What is the flag for creating the archive compressed with bzip2? Without looking it up? I have no idea. "b" maybe? Does the file name come before the folder name, or is it vice versa? Who knows.
How about:
tar c folder | bzip2 > folder.tar.bz2
I didn't have to look any of that up.
- eMSF 7y agoThe file name's position is not magical; it's linked to the -f flag. tar -c [files...] -f archive.tar The thing is, for both basic compressing and decompressing you don't actually have to memorize all that much: tar xf archive.tar.gz # to uncompress tar caf archive.tar.ext [files...] # to compress (One could argue that for symmetry you might want to use xaf instead of xf.)