• @[email protected]
      link
      fedilink
      81 month ago

      Same, I didn’t realize the directory I was deleting had a symlink to some root directory, at least until my mouse stopped working…

      • @[email protected]
        link
        fedilink
        8
        edit-2
        1 month ago

        Gnome used to have a link to your homedir in its settings directory.

        I imagine plenty of people had tons of fun with that. But you need to modify rm to follow symlinks nowadays.

    • @[email protected]
      link
      fedilink
      English
      11 month ago

      I fairly recently tried to do a rm match* but accidentally put a space between the match and the *

    • @[email protected]
      link
      fedilink
      301 month ago

      Reminds me of the time when I bind mounted my home dir in a chroot, then rm -rfed the chroot when I no longer needed it…

      • redjard
        link
        fedilink
        121 month ago

        Wanted to reorganize my /mnt once and did an rm -r … without unmounting the network share of production.
        We have backups now.

      • palordrolap
        link
        fedilink
        191 month ago

        Reminds me of the company where one of the top brass tried to unmount an important fileshare with rm. That was the day they found out that they didn’t have recent backups of a, shall we say disquieting, amount of important information and people’s work.

        Staff started taking their own private backups of important things after that.

  • duckiegobrrr
    link
    fedilink
    71 month ago

    I mean I have to wipe out my ~ relatively frequently on some machines at times but that’s for “actual” “reasons”, LLM hallucinations not involved

    • @[email protected]
      link
      fedilink
      191 month ago

      For when you want to delete everything in the root directory, but absolutely need to keep the directory itself.

    • @[email protected]
      link
      fedilink
      15
      edit-2
      1 month ago

      So. Funny story. Back when I was incredibly new to Linux, I was trying to move everything from my downloads folder to somewhere else. So I navigated into the downloads directory on the command line and sent something like

      “sudo mv /* ~/misc”

      when I meant to type

      “sudo mv ./* ~/misc”

      Yea… That was a fun learning experience and hilarious way to utterly fuck everything on that machine. Luckily it was just an old laptop I’d installed Linux on to mess around and learn, no real damage done

    • @[email protected]
      link
      fedilink
      351 month ago

      Should be \~ in most shells, certainly bash. Use mkdir and rmdir when messing around to prevent accidents.

      • DacoTaco
        link
        fedilink
        91 month ago

        Saw this post this morning and was thinking about how to delete it ( while falling back asleep ). Escaping the ~, ofc that’d work! I feel so stupid now haha

    • @[email protected]
      link
      fedilink
      71 month ago

      A method not yet mentioned is by inode, (I’ve accidentally created filenames I didn’t know how to escape at the time like -- or other command line flags/special characters)

      ls -li

      Once you get the inode

      find . -type f -inum $inode -delete

      • @[email protected]
        link
        fedilink
        English
        31 month ago

        In case you are just testing it out, don’t use -rf
        Your ~ directory is most probably empty, so use rm -d instead, to prevent all footguns in case you put the wrong character in the end.

               -d, --dir
                      remove empty directories
        

        I feel safe doing rm -d /.
        I feel safe doing sudo rm -d /.

        Because it won’t delete anything that has a file in it.

    • @[email protected]
      link
      fedilink
      English
      521 month ago

      AI will create the most cursed entry jobs humans have yet to see.

      First job in the old days doing WordPress, managing someone’s vomit inducing PHP? Gone.

      Jobs with jQuery spaghetti calling dozens of asp APIs like a rat’s nest no rat can traverse? Gone.

      Welcome to the future: Fixing some “business” guy’s vibe coded personal hell made just for you.

      • @[email protected]
        link
        fedilink
        English
        91 month ago

        Asking AI to make my website in C.

        Who’s going to fix that “business” for me? BTW, the AI says, it’s 95% done and only needs some debugging, so you’ll be paid accordingly.

  • @[email protected]
    link
    fedilink
    71 month ago

    You can definitely do this redirecting output. I did this to myself and sighed about 2 seconds into it after realizing what I had done.