• @[email protected]
    link
    fedilink
    41 year ago

    Yep, my friend made a similar mistake. He meant rm -rf music But typed rm -rf /music

    Deleted his whole music collection which was very important to him. I felt so bad for him. I had given him the little bit of Linux knowledge he had when he switched to Linux and made that mistake.

    • Greenman
      link
      61 year ago

      To avoid rm mistakes in the future, you could set an alias that always provides the “-i” flag which makes the command prompt you with y/n before the deletion. Another solution is to alias rm for trash-cli commands to move files to the trash like when you delete files in your graphical file manager.

    • Nanachi
      link
      01 year ago

      there was a undo package for that if I remember correctly

      • Nanachi
        link
        01 year ago

        gitfs has that? maybe idk

  • @riodoro1
    link
    31 year ago

    I alias rm to rm --no-preserve-root for a nice surprise.

  • U de Recife
    link
    fedilink
    1
    edit-2
    1 year ago

    Install trash. Then create an alias for it. rm='trash -frv'. Problem solved.