• Julian@lemm.ee
    link
    fedilink
    English
    arrow-up
    6
    ·
    11 months ago

    How would the distro tell if the tar.gz is a program or just a bunch of compressed files? I tend to use tar files for compression rather than for distributing or installing software

      • 0x4E4F@sh.itjust.worksOP
        link
        fedilink
        English
        arrow-up
        1
        ·
        11 months ago

        Yes, but the header of the file says it’s a binary, that is why it gives you the option to run as a program or open as a file. Because the OS knows that you can do either with binaries.

          • 0x4E4F@sh.itjust.worksOP
            link
            fedilink
            English
            arrow-up
            1
            ·
            edit-2
            11 months ago

            Some file managers might add the +x automatically if you choose to run the binary through the desktop environment (not the terminal)… or ask you if you’d like to mark the file as an executable (i.e. add +x to permissions).

            You can’t do it the same way with tar, what are you gonna execute, tar is neither a script or an ELF binary. It’s like asking for a zip file to be executable, doesn’t make sense. You can change the extension to .exe, but it won’t run, it’s not an exe, no MZ header, nothing 🤷.