Sudo rm -rf .

      • jaybone@lemmy.zip
        link
        fedilink
        English
        arrow-up
        6
        ·
        8 hours ago

        And if he’s on / (root) on most common distros, there won’t be any dirs with . (dot) in their name. Unless this matches the dot from the cwd, in which case this is the same as “rm -rf /“? Now I’m curious, I don’t often perform operations on the cwd using dot.

        • Lena@gregtech.eu
          link
          fedilink
          arrow-up
          4
          ·
          8 hours ago

          At least bash doesn’t seem to match it…

          gregor@raspberrypi:~ $ ls
          bridge  navidrome  seed  traefik
          gregor@raspberrypi:~ $ ls *.*
          ls: cannot access '*.*': No such file or directory
          gregor@raspberrypi:~ $ cat *.*
          cat: '*.*': No such file or directory
          
          • jaybone@lemmy.zip
            link
            fedilink
            English
            arrow-up
            1
            ·
            edit-2
            7 hours ago

            Right, so then if asterisk wildcards don’t match on . and … then, in most common distros where there is no dot in any of the top level dirs in /, “rm -rf *.*” in the top level / dir is basically harmless and likely a noop.

            So OP is wrong.

    • Stupidmanager@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      5 hours ago

      Going to point out that not only is *.* unnecessary, but he’s in ~ (home) so assuming it even worked he just deleted his home.