Hacker News new | past | comments | ask | show | jobs | submit login

Quick word of warning, if you download it: The release archive doesn't create a directory, just untars into $CWD. So do this:

    mkdir btop
    cd btop
    tar xjvf ~/Downloads/btop.....tbz
    ./install.sh
Apart from that, it looks really, really nice. I like it a lot!



I use atool (https://www.nongnu.org/atool/) for unpacking random archives - it abstracts away all formats including zip/rar/7z, compression and also guarantees that nothing is ever extracted into $CWD.


I use `unp` for the same thing. `-u` extracts into a directory.


Since unp is a stock ticker, it's a little harder to find: https://github.com/mitsuhiko/unp

Looks like it might be in standard Ubuntu repositories:

https://manpages.ubuntu.com/manpages/xenial/man1/unp.1.html


i use unar/lsar

https://theunarchiver.com/command-line https://github.com/MacPaw/XADMaster

in difference to unp and atool, unar does not depend on other tools to unpack the actual archive


Gotta check that out, thanks for the tip!


This is why I have trust issues when github pulling or exploding a tar.


Maybe it's just me, but this seems like the more obvious behaviour? Personally I'd typically extract in /tmp/relevant-name, and sometimes that results in /tmp/relevant-name/relevant-name.

Doesn't seem a big deal or require/cause trust issues to me.

(And when I create one, I always have to check/look up what happens, so it doesn't surprise me that a variety of things get done at all.)


It's been common convention for decades that if you distribute a source tarball of something, that everything inside is inside a directory named foobar-1.0 where 'foobar' is the project name and 1.0 is the version.

Not everyone does this, of course, but it's nice when they do. Because it means you can just wget the file into a dir and untar it without worrying about it messing up whatever is already there. Also handy for putting different versions of the project side-by-side.


Ok, but like you say it's a mixed bag - I 'wget the file into a dir and untar it without worrying about it messing up whatever is already there', because nothing is, it's a mktemp -d or manual equivalent.


That was typical on DOS/Windows when distributing ZIP archives, for a long time.

But on *nix systems, the idiom for tarballs usually includes a directory containing all of the contents.

> (And when I create one, I always have to check/look up what happens, so it doesn't surprise me that a variety of things get done at all.)

True - I usually do a `tar tf foo.tar.xz |head` to get a quick peek at the archive. This generally avoids the problem of dumping a bunch of files into the current directory.


I always check the contents with -t before extracting.


One could always run "tar tv[z]f" on the archive first, and then choose whether or not to explode it in the current directory.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: