4 ms·
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 ta
by bloopernova 5y ago
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!
- isclever 5y agoThis is why I have trust issues when github pulling or exploding a tar.
- OJFord 5y agoMaybe 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.)
- bityard 5y agoIt'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.
- OJFord 5y agoOk, 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.
- wyldfire 5y agoThat 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.
- nerdponx 5y agoI always check the contents with -t before extracting.
- mangamadaiyan 5y agoOne could always run "tar tv[z]f" on the archive first, and then choose whether or not to explode it in the current directory.
- matoro 5y agoI use atool (https://www.nongnu.org/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.
- linsomniac 5y agoGotta check that out, thanks for the tip!
- iudqnolq 5y agoI use `unp` for the same thing. `-u` extracts into a directory.
- ydant 5y agoSince unp is a stock ticker, it's a little harder to find: https://github.com/mitsuhiko/unp https://github.com/mitsuhiko/unp Looks like it might be in standard Ubuntu repositories: https://manpages.ubuntu.com/manpages/xenial/man1/unp.1.html https://manpages.ubuntu.com/manpages/xenial/man1/unp.1.html
- em-bee 5y agoi use unar/lsar https://theunarchiver.com/command-line https://theunarchiver.com/command-line https://github.com/MacPaw/XADMaster https://github.com/MacPaw/XADMaster in difference to unp and atool, unar does not depend on other tools to unpack the actual archive