I’m a complete moron, I should’ve had that backed up and used trash…
I had to learn the hard way lol

  • TGhost [She/Her]
    link
    fedilink
    English
    196 months ago

    I’m a complete moron,

    You are not,
    Every person learning with the hardway isnt a moron,

    You have to do, to really learn,

  • @xlash123@sh.itjust.works
    link
    fedilink
    46 months ago

    I’ve started adopting the habit of putting “-rf” as the last argument to avoid accidentally deleting something before I’ve double-checked my input. Good luck, and may this never happen again.

    • @Edo78@feddit.it
      link
      fedilink
      16 months ago

      I do exactly the same. It’s not foolproof but it’s better than nothing. I remember, almost a decade ago, when I discovered that rm on mac didn’t accept flags as last arguments… I hope they changed that behavior

  • @RenardDesMers@lemmy.ml
    link
    fedilink
    36 months ago

    Sorry for your loss. I did something similar recently. A script was creating a “~” folder in my notes folder. I wanted to delete it… Thankfully it stopped at some file it couldn’t remove and my dotfiles are in git.

    • @ma1w4re@lemm.ee
      link
      fedilink
      2
      edit-2
      6 months ago

      A tip, to delete files that have names similar to variables or other expandables, put the filename in between single ticks like this ‘filename’. Single ticks prevent expansion.

  • @BaumGeist@lemmy.ml
    link
    fedilink
    26 months ago

    i have rm aliased to rm -i, it’s basically the closest to PowerShell’s -WhatIfthat a posix shell gets

  • 小莱卡
    link
    fedilink
    English
    26 months ago

    thats the sort of command you need to make an alias for

    • wuphysics87
      link
      fedilink
      26 months ago

      That’s very helpful now. You have added nothing other than to pull the declarative distro equivalent of “I use Arch, BTW” And then link your literal code. For shame. For shame.

      • @sudoer777@lemmy.ml
        link
        fedilink
        2
        edit-2
        6 months ago

        nix/guix can be used on any distro and it provides a way to organize .config files so that if the .config directory gets deleted or accidentally modified for some reason, restoring it would be very easy. By putting the configuration in a git repo, it also makes it easy to restore previous configurations. I accidentally deleted a bunch of stuff in my .config directory once and that’s one of the reason I use this tooling now, so I thought OP would find it helpful also