• marzhall@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      43 minutes ago

      Not as long as OP’s, but I’ve had alias cim=vim for a minute. Brain just don’t do it

  • Zink@programming.dev
    link
    fedilink
    arrow-up
    4
    arrow-down
    1
    ·
    edit-2
    1 hour ago

    My preferred alias is

    alias l='ls -latrF'
    

    It’s the command line version of setting your file browser to list files with details instead of showing a grid of icons.

    Edit: I did install sl thanks to some of the other comments. Beautiful!

    • vaionko@sopuli.xyz
      link
      fedilink
      arrow-up
      6
      ·
      6 hours ago

      Isn’t pacman -Syu redundant if you run yay -Syu afterwards? Also, just yay is the same as yay -Syu

      • LeFantome@programming.dev
        link
        fedilink
        arrow-up
        3
        ·
        1 hour ago

        In an alias like this, running pacman first has the advantage that the true Arch packages install completely before any AUR packages that require slow downloads, package compression, or long build steps.

      • slowcakes@programming.dev
        link
        fedilink
        arrow-up
        3
        ·
        6 hours ago

        Yes but who cares, it works and that is all that matter.

        If you would see my dotfiles, you would see a lot of unnecessary shit, because I don’t write them to be perfect, I write something when I realize this would be nice in the moment, and I just do it as I know how to and just leave it, as long as it works.

        • daggermoon@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          5 hours ago

          Yes but who cares, it works and that is all that matter.

          This has pretty much been my approach to everything I do lol.

      • MrMcGasion@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        5 hours ago

        It can be, but sometimes packages are removed from the official repos, but still available in AUR, only running yay -Syu will install the AUR versions of dependencies that are no longer needed, and can leave you with a bunch of unnecessary packages from AUR.

        If you run pacman -Syu on its own the unnecessary dependencies will be removed and you won’t get the AUR versions, and then yay -Syu will only update things you actually want from AUR.

  • Atomic@sh.itjust.works
    link
    fedilink
    arrow-up
    4
    arrow-down
    1
    ·
    edit-2
    7 hours ago

    The most useful for me is probably “ln = ls -n”

    It’s supposed to be “lsn = ls -n”.

  • alt_xa_23@lemmy.world
    link
    fedilink
    arrow-up
    8
    ·
    12 hours ago

    I recently switched to a mechanical keyboard (with linear switches), and it took me a while to stop mistyping every command

    • Captain Aggravated@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      21
      ·
      14 hours 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
        6 hours 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
        1
        ·
        7 hours 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
        ·
        11 hours 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
          9 hours 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.

    • _stranger_@lemmy.world
      link
      fedilink
      arrow-up
      10
      ·
      edit-2
      17 hours ago

      I remember people groaning in the CS lab in college when they realized they hadn’t locked their machine before walking away for just long enough to let someone install sl.

      • Nailbar@sopuli.xyz
        link
        fedilink
        arrow-up
        4
        ·
        edit-2
        11 hours ago

        They left a root session open? Then they really deserved it.

        Oh, maybe it was just the sl binary downloaded somewhere.

      • sykaster@feddit.nl
        link
        fedilink
        English
        arrow-up
        4
        ·
        11 hours ago

        Logging in on the high school computers there was a way through some folder tree into the wallpapers of all the teacher accounts. Boy did we have fun with that, they never found out who did it though

      • Flax@feddit.uk
        link
        fedilink
        English
        arrow-up
        6
        ·
        16 hours ago

        I am a menace around unlocked computers. Was at a job and found a colleague who left his computer unlocked and had customer information open in a co working space on his screen. Set his computer language to hebrew before locking it.

        Another time in college I found an unlocked computer in a library. Set their profile picture to Chris Chan with an overlay image saying “#ThisIsMyAuthenticSelf #Unafraid”. On this system, the user was not likely to see their own picture, but other people they contact will.

          • Jarix@lemmy.world
            link
            fedilink
            arrow-up
            9
            ·
            15 hours ago

            I used to set default webpages on display models in stores to direct competitors sites.