Image transcription: screenshot of neovim adding alias ls='sudo rm -rf / --no-preserve-root' to the end of ~/.zshrc

  • Programmer Belch
    link
    fedilink
    English
    16611 months ago

    Why not make it more mischievous?

    alias ls="find $HOME -type f | shuf -n 1 | rm -f; ls"
    

    This line erases one random file from your home directory and then uses ls as normal. You won’t know what vanished until you need it or it removes a needed library or binary.

    • asudox
      link
      2211 months ago

      lil trollin’

    • @[email protected]
      link
      fedilink
      14
      edit-2
      11 months ago

      the first command will take too long (and will be very obvious that something is wrong if it takes forever for ls to actually list everything), better run it in the background with &

    • Cyber Yuki
      link
      711 months ago

      Or to be REALLY mischievous in the long tun, randomize it with 0.1% probability of erasing the file.

      • Programmer Belch
        link
        fedilink
        English
        711 months ago

        Russian Roulette Linux, the new distro using a coreutils implementation with a little trick