• renzev@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    25 days ago

    Obligatory shilling for unar, I love that little fucker so much

    • Single command to handle uncompressing nearly all formats.
    • No obscure flags to remember, just unar <yourfile>
    • Makes sure output is always contained in a directory
    • Correctly handles weird japanese zip files with SHIFT-JIS filename encoding, even when standard unzip doesn’t
      • renzev@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        edit-2
        24 days ago

        Voicebanks for Utau (free (as in beer, iirc) clone of Vocaloid) are primarily distributed as SHIFT-JIS encoded zips. For example, try downloading Yufu Sekka’s voicebank: http://sekkayufu.web.fc2.com/ . If I try to unzip the “full set” zip, it produces a folder called РсЙ╠ГЖГtТPУ╞Й╣ГtГЛГZГbГgБi111025Бj. But unar detects the encoding and properly extracts it as 雪歌ユフ単独音フルセット(111025). I’m sure there’s some flag you can pass to unzip to specify the encoding, but I like having unar handle it for me automatically.

        • sh__@lemmy.world
          link
          fedilink
          arrow-up
          0
          ·
          24 days ago

          Ah, that’s pretty cool. I’m not sure I know of that program. I do know a little vocaloid though, but I only really listen to 稲葉曇(Inabakumori).

          • renzev@lemmy.world
            link
            fedilink
            English
            arrow-up
            0
            ·
            22 days ago

            I know inabakumori! Their music is so cool! When I first listened to rainy boots and lagtrain, it made me feel emotions I thought I had forgotten a long time ago… I wish my japanese was good enough to understand the lyrics without looking them up ._. I’m also a huge fan of Kikuo. His music is just something completely unique, not to mention his insane tuning. He makes Miku sing in ways I didn’t think were possible lol

            • sh__@lemmy.world
              link
              fedilink
              arrow-up
              0
              ·
              22 days ago

              I get you, I want to learn more Japanese. I only understand a very small amount at this point. I don’t have any Miku songs that I have really wanted to listen to, but that could change. I might check out Kikuo then. Also I love the animations Inabakumori release with their songs too. They have some new stuff that’s really good if you haven’t checked it out yet.

  • cygon@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    25 days ago

    I’m the weird one in the room. I’ve been using 7z for the last 10-15 years and now .tar.zst, after finding out that ZStandard achieves higher compression than 7-Zip, even with 7-Zip in “best” mode, LZMA version 1, huge dictionary sizes and whatnot.

    zstd --ultra -M99000 -22 files.tar -o files.tar.zst

    • Eiim@lemmy.blahaj.zone
      link
      fedilink
      arrow-up
      0
      ·
      25 days ago

      You can actually use Zstandard as your codec for 7z to get the benefits of better compression and a modern archive format! Downside is it’s not a default codec so when someone else tries to open it they may be confused by it not working.

  • AVincentInSpace@pawb.social
    link
    fedilink
    English
    arrow-up
    0
    ·
    24 days ago

    If you download and extract the tarball as two separate steps instead of piping curl directly into tar xz (for gzip) / tar xj (for bz2) / tar xJ (for xz), are you even a Linux user?

    • brian@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      24 days ago

      the problem is if the connection gets interrupted your progress is gone. you download to a file first and it gets interrupted, you just resume the download later

      • AVincentInSpace@pawb.social
        link
        fedilink
        English
        arrow-up
        0
        ·
        edit-2
        24 days ago

        They really, really aren’t. Let’s take a look at this command together:

        curl -L [some url goes here] | tar -xz
        

        Sorry the formatting’s a bit messy, Lemmy’s not having a good day today

        This command will start to extract the tar file while it is being downloaded, saving both time (since you don’t have to wait for the entire file to finish downloading before you start the extraction) and disk space (since you don’t have to store the .tar file on disk, even temporarily).

        Let’s break down what these scary-looking command line flags do. They aren’t so scary once you get used to them, though. We’re not scared of the command line. What are we, Windows users?

        • curl -L – tells curl to follow 3XX redirects (which it does not do by default – if the URL you paste into cURL is a URL that redirects (GitHub release links famously do), and you don’t specify -L, it’ll spit out the HTML of the redirect page, which browsers never normally show)
        • tar -x – eXtract the tar file (other tar “command” flags, of which you must specify exactly one, include -c for Creating a tar file, and -t for Testing a tar file (i.e. listing all of the filenames in it and making sure their checksums are okay))
        • tar -z – tells tar that its input is gzip compressed (the default is not compressed at all, which with tar is an option) – you can also use -j for bzip2 and -J for xz
        • tar -f which you may be familiar with but which we don’t use here – -f tells tar which file you want it to read from (or write to, if you’re creating a file). tar -xf somefile.tar will extract from somefile.tar. If you don’t specify -f at all, as we do here, tar will default to reading the file from stdin (or writing a tar file to stdout if you told it to create). tar -xf somefile.tar (or tar -xzf somefile.tar.gz if your file is gzipped) is exactly equivalent to cat somefile.tar.gz | tar -xz (or tar -xz < somefile.tar – why use cat to do something your shell has built-in?)
        • tar -v which you may be familiar with but which we don’t use here – tells tar to print each filename as it extracts the file. If you want to do this, you can, but I’d recommend telling curl to shut up so it doesn’t mess up the terminal trying to show download progress also: curl -L --silent [your URL] | tar -xvz (or -xzv, tar doesn’t care about the order)

        You may have noticed also that in the first command I showed, I didn’t put a - in front of the arguments to tar. This is because the tar command is so old that it takes its arguments BSD style, and will interpret its first argument as a set of flags regardless of whether there’s a dash in front of them or not. tar -xz and tar xz are exactly equivalent. tar does not care.

        • PlexSheep@infosec.pub
          link
          fedilink
          arrow-up
          0
          ·
          24 days ago

          Thanks for the explanation, I might use more pipes now. Is it correct, that tar will restore the files in the tarball in the current directory?

  • jh29a@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    24 days ago

    I use .tar.gz in personal backups because it’s built in, and because its the command I could get custom subdirectory exclusion to work on.

  • PeggyLouBaldwin@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    25 days ago

    most of the things i want to send around my network in archives are already compressed binary files, so i just tar everything.

          • Illecors@lemmy.cafe
            link
            fedilink
            English
            arrow-up
            0
            ·
            25 days ago

            The link does not load for some reason, but tar itself does not compress anything. Compression can (and usually is) applied afterwards, but that’s an additional integration that is not part of Tape ARchive, as such.

    • sik0fewl@lemmy.ca
      link
      fedilink
      arrow-up
      0
      ·
      25 days ago

      I stopped doing that because I found it painfully slow. And it was quicker to gzip and upload than to bzip2 and upload.

      Of course, my hardware wasn’t quite as good back then. I also learned to stop adding ‘v’ flag because the bottleneck was actually stdout! (At least when extracting).

      • robolemmy@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        25 days ago

        for the last 14 years of my career, I was using stupidly overpowered Oracle exadata systems exclusively, so “slow” meant 3 seconds instead of 1.

        Now that I’m retired, I pretty much never need to compress anything.