Hacker News new | ask | show | jobs
by paulsmith 4836 days ago
A simple `tar -xvf` can replace the separate `gunzip` and `tar` processes.
2 comments

You can bypass writing the archive to disk, as well:

    pushd /tmp && \
    curl 'http://downloads.sourceforge.net/project/tmux/tmux/tmux-1.8/tmux-1.8.tar.gz?r=http%3A%2F%2Ftmux.sourceforge.net%2F&ts=1364579710&use_mirror=garr'| tar xvf && \
    cd tmux-1.8 && \
    ./configure --prefix=~/installs/tmux-1.8 && \
    mkdir ~/installs && \
    make && \
    make install && \
    popd
Do you mean `tar -xzvf`?
Yes, formally. You don't have to specify -z in GNU tar today, you can just say -x and it'll add -z or -j for you -- it figures out on the fly if the archive's been compressed and how. Very convenient.
You can also leave off the dash: `tar xvf`
And you may skip verbose too: `tar xf`