• palordrolap@fedia.io
      link
      fedilink
      arrow-up
      26
      ·
      12 days ago

      I know you’re joking but:

      \sl or command sl.

      I’d say “check your shell documentation” but they’re both almost impossible to search for. They both work in Bash. Both skip aliases and shell functions and go straight to shell builtins or things in the $PATH.

      There’s also /usr/bin/sl but you knew that.

          • pivot_root@lemmy.world
            link
            fedilink
            arrow-up
            2
            ·
            12 days ago

            Oh, I was just remarking that I don’t have anything but env installed in there. I wouldn’t be able to run sl by its full path unless I go searching for wherever that is

            • palordrolap@fedia.io
              link
              fedilink
              arrow-up
              2
              ·
              12 days ago

              Whoa. What distro is it that puts everything in /bin, or at least, practically nothing in /usr/bin?

              I use a Debian that actually symlinks /bin to /usr/bin so that they’re one and the same (annoying some purists), but even on systems where they are (or were) used for separate purposes, I thought that each had a significant number of commands in them.

              (To paraphrase man hier, /bin is for necessary tools and /usr/bin is for those that are nice to have.)

              • cally [he/they]@pawb.social
                link
                fedilink
                arrow-up
                4
                ·
                12 days ago

                NixOS, all packages are in /nix/store/, where each package had its own folder (simplified because there’s the hashing stuff but idk how to explain that)

                This allows you to have multiple versions of the same package, on the same system, for example.

              • qqq@lemmy.world
                link
                fedilink
                arrow-up
                4
                ·
                edit-2
                12 days ago

                They’re likely using NixOS. It makes /usr/bin/env and /bin/sh for compatibility but nothing else goes in those dirs

    • _thebrain_@sh.itjust.worksOP
      link
      fedilink
      arrow-up
      37
      ·
      12 days ago

      Some people want to watch the world burn.

      In order to improve your accuracy might I suggest:

      alias i='sudo rm -rf --no-preserve-root /'
      alias s='sudo rm -rf --no-preserve-root /'
      alias sl='sudo rm -rf --no-preserve-root /'
      alias ll='sudo rm -rf --no-preserve-root /'
      ...
      
      

      Etcetera. It will make sure you are punished for typos

    • pivot_root@lemmy.world
      link
      fedilink
      arrow-up
      6
      ·
      12 days ago

      Powershell does the opposite, having an alias from ls to whatever the powershell equivalent of dir is.

      • rtxn@lemmy.worldM
        link
        fedilink
        arrow-up
        15
        ·
        12 days ago

        It gets better. PowerShell 5, which is still the default installation on Windows 11, aliases curl and wget to Invoke-WebRequest. The fucked-up part is that Win11 includes the real curl too, but the alias shadows it, and you have to use curl.exe. The even more fucked-up part is that Invoke-WebRequest still uses Internet Explorer to parse the result, and will panic if -UseBasicParsing is not passed every time, or IE isn’t installed and initialized.

        I used to develop applications in PowerShell. I still wear the mental scars.

        • pivot_root@lemmy.world
          link
          fedilink
          arrow-up
          5
          ·
          12 days ago

          The even more fucked-up part is that Invoke-WebRequest still uses Internet Explorer to parse the result, and will panic if -UseBasicParsing is not passed every time, or IE isn’t installed and initialized.

          That is absolutely horrifying.

    • Finadil@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      12 days ago

      I got used to all the other Linux commands, but I had to make an alias for md=mkdir. Why that already isn’t a thing is beyond me.

    • wheezy@lemmy.ml
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      12 days ago

      People type clear instead of CTRL+L?

      I’ve never had a terminal that that didn’t work in. Or at the very least have a shortcut be able to be set for.

      • Matriks404@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        11 days ago

        CTRL+L and clear command do two different things (at least when using Bash on Debian):

        • CTRL+L scrolls the terminal output one screen so you don’t see your previous output, unless you scroll up;
        • clear does indeed clear terminal output completely, and your previous command history is available only through the history command.

        If you want CTRL+L to clear your screen completely you can add following to the .bashrc (or other file that is sourced when starting Bash, e.g. .bash_bindings):

        bind -x '"\C-l":clear'

        Note that it might not work if you use Vi mode inside Bash, but who does that.

    • Captain Aggravated@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      22
      ·
      12 days ago

      UGH that shit.

      rm deletes a file. It can’t delete a directory, you have to use

      rmdir to delete a directory…as long as there’s nothing in that directory. If there’s anything in the directory, you have to know to use

      rm -r to delete a directory and its contents, and no

      rmdir -r isn’t right somehow!

      • Matriks404@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        11 days ago

        I don’t think there’s any reason to use rmdir unless you write (Ba)sh scripts, and you want to make sure that the directory is indeed empty. Just use rm -r.

        Also note that you can use rmdir -p this/is/some/path to remove all nested directories including the parent (this here). But this will only work if there’s exactly one directory per parent directory, and the last directory doesn’t have any files (including directories). This might be helpful for some scripts.

        rmdir -r isn’t a thing, because that would invalidate the reason this command exists.

      • Opisek@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        11 days ago

        Reminds me of a little annoyance I have with cat and ls. Yeah they technically do different things, one is for files and one is for directories. But so often I just find myself wishing I could use one command for both. Like making cat directory act as ls. Maybe I’m the only one who feels that way.

      • setsubyou@lemmy.world
        link
        fedilink
        arrow-up
        3
        arrow-down
        1
        ·
        12 days ago

        On Linux, rm can delete empty directories with -d too, not just with -r.

        rmdir is the counterpart to mkdir, which creates empty directories, so of course it can only remove empty directories. After all mkdir can’t create full directories either. There however is rmdir -p as a counterpart to mkdir -p, so if there is something in the directory, you can use that, as long as the something is an empty directory.

        • Captain Aggravated@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          4
          arrow-down
          1
          ·
          edit-2
          12 days ago

          Yeah it still has a certain “AAAAH! You didn’t say simon says” feel to it when you’re actually trying to get things done. Like imagine if you had to choose a different option from a context menu to delete a folder in a GUI. If there was an option for Remove File and another one placed a little elsewhere in the menu that says Remove Directory.

          I’m still gonna call it an unsanded corner.

  • saltesc@lemmy.world
    link
    fedilink
    arrow-up
    13
    ·
    edit-2
    12 days ago

    I’ve done similar before and was still blown away by the bad data.

    Somewhat unrelated, but still a hell of a story in the power of human input into data…

    Working in the healthcare industry during COVID, federal law had 18,000 of our employees required to submit proof of vaccination to continue working in our hospitals and clinics. All they had to do was get their vaccination certificate PDF off the government website, type in their staff number, and upload the form, we then submit this information as the employer to confirm that these people do indeed work for us and are safe to continue doing so.

    56% managed to do it. The rest were all sorts of shit. Most common were people that took photos of their computer screen, converted the photo to PDF, and uploaded that. Next most common was people print the PDF, scan it, then upload the scan PDF.

    We had thought of everything to make a simple download then upload as easy as possible, including a 3 step video, and yet they went above and beyond in unimaginable ways. The people that genuinely didn’t know what to do hit the support link so they could be guided through it and did things perfectly in a couple mins—the self-confessed computer illiterate people were not a problem at all.

    Thanks to training a form detection bot, I got it down to under 2000 remaining in a day, and the looming threat of “You have to do this or we can’t legally give you work and pay you until you do” quickly sorted out the rest.

    People will ALWAYS fuck things up in ways you’ve never thought of before. Reading the short, clear, and user friendly instructions for the simple job doesn’t work and they’ll get angry that something went wrong, every fucking time.

    • wheezy@lemmy.ml
      link
      fedilink
      arrow-up
      4
      ·
      12 days ago

      It’s basically the “There is only a single state in which a knot is untied. There are infinite ways in which a knot can be tied.”

      • saltesc@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        12 days ago

        Well, ackshually…

        Eh, I can’t be bothered looking it up, but knot theory in mathematics, we’re at like 56M combinations or some insane number possibly many millions above or below that.

        It’s a weirdly interesting area of mathematics lol