3 ms·
> Can you tell me what all the flags of `tar -xvzf` Yes. x: extract v: verbose z: zip (or unzip) archive f: file name to follow. > Do you think you would
by balls187 11y ago
> Can you tell me what all the flags of `tar -xvzf`
Yes.
x: extract
v: verbose
z: zip (or unzip) archive
f: file name to follow.
> Do you think you would ever discover that combination on your own from reading the man pages?
Yes. Turns out, I wanted to tar up my nodejs directory, but omit the `node_modules` folder.
> Of course the command line makes many things easier.
Exactly. I'm not a high level computer scientist, but I imagine, being able to easily deal with files and data would help things out quite a bit. So there while it can be painful to learn bash, it's something that pays off heaps in the long run. My opinion.
- loonattic 11y ago`z' means to use gzip compression when extracting or creating a tarball. `J' means xz, `j' bzip2. For example, to create an xz-compressed tar file: tar cJvf archive.tar.xz some_directory/ Generally, you can omit those when uncompressing, at least with GNU tar. OpenBSD's tar is less friendly - it doesn't seem to try to autodetect the compression format. Last time I checked, it didn't support xz either. One had to install the package and then do something such as tar cf - directory/ | xz > something.txz where the - means that the tarball is written to standard output. /dev/stdout would work as well.
- loonattic 11y agoHonestly, I think build system complexity and breakage, and library/dependency/versioning hell is a much bigger problem than just learning how to use tar. The number of times I've had autoconf configure scripts whine about not being able to find some library when it is installed for whatever reason...