DEV Community

Discussion on: Don't fear the command line : Tar. What is that?

Collapse
 
trueneu profile image
Pavel Gurkov

If you don't want to remember that in the short option cluster the -f has to come last, you may as well use the traditional tar argument passing style.

tar cfv archive.tar folder
Enter fullscreen mode Exit fullscreen mode

Also, I have to note that saying that "tar archive is essentially a zipfile" is a bit backwards. First, tar is 10 years older than zip. Second, ZIP is a format that supports compression with a number of algorithms. TAR archives are, essentially, bytestreams, with whatever compression algorithm you want put on top. GNU tar supports invocation of gzip, lzma, zstd, bzip2 and others, but nothing stops you from piping tar output to your custom compression algorithm. That's slightly different from GNU zip which, as far as I know, always compresses the information.

Collapse
 
deniselemonaki profile image
Dionysia Lemonaki

Thanks for your comment and adding this! :)