Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Actually, for extracting tar files, using xf is enough.

    tar xf archive.tar.gz
    tar xf archive.tar.bz2
Still, this will be useful for other formats, I think. Thanks.


Don't you need the z and j flags, respectively? The way you write it works for uncompressed tars.


Did you check? GNU tar will guess based on file suffix.


That's cool, although most of the time when I use tar, it's in a command line like

    curl http://example.com/foo.tar.gz | tar zxf -




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

Search: