3 ms·
>I mean, I know because I've used it enough Perhaps you mean that you've looked it up. Others could do so, too; it's not that hard (even if a web comic makes l
by eMSF 7y ago
>I mean, I know because I've used it enough
Perhaps you mean that you've looked it up. Others could do so, too; it's not that hard (even if a web comic makes light-hearted fun of the subject)!
Anyway, here's a fun fact: tar is smarter than you give it credit. The commands below do just work:
tar xf uncompressed.tar
tar xf gzipped.tar.gz
tar xf xzipped.tar.xz
- OskarS 7y agoThat'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.)