Hacker Newsnew | past | comments | ask | show | jobs | submit | BeepInABox's commentslogin

Right, so nothing?

In the same way as not releasing angry bees into your cube farm is doing nothing, yes!!

For anyone curious, unless you are running a 'tar' binary from the stone ages, just skip the gunzip and cat invocations. Replace .gz with .xz or other well known file ending for different compression.

  Examples:
    tar -cf archive.tar.gz foo bar  # Create archive.tar.gz from files foo and bar.
    tar -tvf archive.tar.gz         # List all files in archive.tar.gz verbosely.
    tar -xf archive.tar.gz          # Extract all files from archive.tar.gz


> tar -cf archive.tar.gz foo bar

This will create an uncompressed .tar with the wrong name. You need a z option to specify gzip.


Apparently this is now automatically determined by the file name, but I still habitually add the flag. 30 years of muscle memory is hard to break!


I tried it to check before making the comment. In Ubuntu 25.04 it does not automatically enable compression based on the filename. The automatic detection when extracting is based on file contents, not name.


If you add a for auto, it will choose the right compression based on the file name.

tar -caf foo.tar.xz foo

Will be an xz compressed tarball.


Not to be confused with Storm the language https://storm-lang.org/index.html


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: