Was trying to extract a totally legit copy of Skate 3 I downloaded today to play on my Steam Deck

        • 0x4E4F@sh.itjust.worksEnglish
          7·
          1 year ago

          GNU switched to long command switches a while ago. Try bsdtar, it’s still just -h.

          They kept the short ones for the actual extract/compress commands though, for compatibility reasons I presume.

      • barsoap@lemm.ee
        2·
        1 year ago

        Nope, tar spec doesn’t say anything about a help message. The man spec OTOH requires at least syntax documentation for all standard utilities to be present on the system.

    • jflorez@sh.itjust.worksEnglish
      68·
      1 year ago

      You just killed us all by putting a space between the dashes

    • woelkchen@lemmy.world
      51·
      1 year ago

      Just tar, no arguments. Does nothing, still a valid command, no?

    • rrconkle@lemmy.zip
      31·
      1 year ago
      tar: You must specify one of the '-Acdtrux', '--delete' or '--test-label' options
      Try 'tar --help' or 'tar --usage' for more information.
      
    • v_krishna@lemmy.mlEnglish
      47·
      1 year ago

      I even read this aloud in my head as “CREATE ZE VUCKING FILE” in a particularly bad German accent same as over 20 years ago when a friend I worked for drilled it in my head.

    • rockSlayer@lemmy.world
      101·
      1 year ago

      Yep, have this one committed to memory. Though if it asked me to uncompress a tarball, then I’d be fucked

      • thejml@lemm.eeEnglish
        9·
        1 year ago

        tar xzvf this_awesome_file.tgz

        … fixed. Apparently I can’t type.

        • hallettj@leminal.spaceEnglish
          10·
          1 year ago

          I think you want to remove the c because that means “create” an archive, and you’re missing a z which applies gzip decompression/compression

          • _thebrain_@sh.itjust.works
            13·
            1 year ago

            I suppose it is tar version dependent, but on any recent Linux version I have used, you can just tar xvf <tar_name.tar.{z,gz,xz,etc}> and it will automatically figure out if it is compressed, what tools were used to compress it, and how to decompress it.

            But you are right, x and c are mutually exclusive.

            • thejml@lemm.eeEnglish
              1·
              1 year ago

              Yeap, apparently I can’t type. So, we’d all be dead anyway with that bomb.

  • bean@lemmy.world
    45·
    1 year ago

    Somehow, idk why. This one is stuck in my head:

    tar -zxvf filename.tar.gz
    
      • Bread@sh.itjust.worksEnglish
        16·
        1 year ago

        I have to do this command often at work and I can never remember the letters perfectly. This is actually useful, thanks!

    • 9point6@lemmy.world
      2·
      1 year ago

      Same, never used a mnemonic for it or anything, just

      zxvf

      Like it’s any other word

      • MonkderDritte@feddit.de
        2·
        1 year ago

        z=zip (default in most tar), x=eXtract, v=verbose (not needed in most cases), f=target

  • llothar@lemmy.ml
    43·
    1 year ago

    tar -xzf stands for tar eXtract Ze Filez

  • Zos_Kia@lemmynsfw.com
    33·
    1 year ago

    There’s an easy mnemonic for that : Compress Ze Vucking File !

    • Synapse@lemmy.world
      10·
      1 year ago

      Always think about tar commands in your best German accent !

  • elrik@lemmy.worldEnglish
    27·
    1 year ago

    How does it verify the command is valid? Does it run what I enter?

    If so, just give it an infinite loop followed by some attempt at a tar command:

    while true; do :; done; tar -xyz
    
    • velvetThunder@lemmy.zipEnglish
      35·
      1 year ago

      Next time I build a bomb I let the timer continue while the command is running.

    • mlg@lemmy.worldEnglish
      26·
      1 year ago

      Blue Team: “Okay everyone let’s make sure this is absolutely the correct input”

      Red Team: “Lmao lets try this 90mb list of bash command injection patterns”

    • lseif@sopuli.xyz
      2·
      1 year ago

      i assume its looking for exit code of 0

  • samus12345@lemmy.worldEnglish
    22·
    1 year ago

    I’d like to know if there are any XKCDs that are no longer relevant.

    • Faresh@lemmy.mlEnglish
      21·
      1 year ago

      This one, if by unix he also means modern linux systems. Nowadays you can simply use tar xf my-file.tar.whatever and it should work on most linux systems (it worked on every modern linux system I’ve tried and every compressed tar file I’ve tried). I don’t think it is hard to remember the xf part.

  • atx_aquarian@lemmy.world
    19·
    1 year ago

    I hitched my horse to just what I consider the basics–zip and unzip–and that has made it easy for me. But I’ve been stuck on those.

    Extract anything:

    tar xf <archive_file>
    

    Create a tbz2 archive:

    tar cjf <archive_file.tbz2> <stuff to put in it>
    

    (And tossing in a -v is pretty universal, if that’s your thing.)

    Some day, instead of commenting on a reddit Lemmy post, I think I’ll Google how to tell it to use .xz.

    Ok, you know what? Today is finally that day. It’s just capital -J instead of lower-case -j! That’s easy enough to remember, I guess.