Elektrine lite

← Feed

@contrapunctus@fe.disroot.org

2026-08-02 19:40 UTC

How do people manage to shoot themselves with rm? I’ve done so with disk partitioning, I’ve done that with #Git, but I can’t think of any such cases with rm 🤔 (Maybe it’s because I’m doing most of my file management with #Emacs + Dired…) #Linux #Unix

Replies (9)

  • @jjdavis@infosec.exchange 2026-08-02 19:55

    @contrapunctus@fe.disroot.org Scripts using rm have potential issues you might not run in to with using rm interactively. Unfortunately I've learned that from experience.

    Open ##4335752

  • @contrapunctus@fe.disroot.org you've never run "rm -rf *" in the wrong folder? 🫠

    Open ##4336312

  • @mezz@mstdn.games 2026-08-02 19:52

    @contrapunctus@fe.disroot.org I've never had that happen with rm either, but I can easily see how that would happen when using stuff like bash wildcards. If I'm feeling particularly paranoid, I'll just do the deleting in a GUI file manager, that moves stuff to trash first.

    Open ##5106511

  • @jautero@indieweb.social 2026-08-02 20:03

    @contrapunctus@fe.disroot.org removing (non-empty) directory using rm -rf $PATHNAME/ comes to mind.

    Open ##5106512

  • @neilvandyke@mastodon.online 2026-08-02 20:09

    @contrapunctus@fe.disroot.org Here's one way... Me as a teen intern, trying to clean up some dotfile directories in /tmp of a server with an overfull filesystem (with /tmp on /), as root: rm -rf .* Only when it didn't return instantly did I start to realize what I had just done, and hammer ctrl-c to make it stop. Too late.

    Open ##5106513

  • @HaraldKi@nrw.social 2026-08-02 20:16

    @contrapunctus@fe.disroot.org rm -rf build/ * There is a fat finger space character in the wrong place.

    Open ##5106535

  • @mcepl@en.osm.town 2026-08-02 20:57

    @contrapunctus@fe.disroot.org rm -rf / something Already happened to me (space between / and dirname).

    Open ##5106537

  • @contrapunctus@fe.disroot.org Yes, you can't footgun yourself with rm if you don't use rm.

    Open ##5106539

  • @contrapunctus@fe.disroot.org when you are super tired and/or super stressed

    Open ##5106540