How not to delete your important files

How not to delete your important files

Lightning talk introducing safe-rm, a tool designed to prevent the accidental deletion of important files.

0110e86fdb31486c22dd381326d99de9?s=128

Francois Marier

August 31, 2014
Tweet

Transcript

  1. No.43 HOW NOT TO DELETE YOUR IMPORTANT FILES François Marier

    <francois@debian.org>
  2. tl;dr apt-get install safe-rm

  3. story

  4. # rm -rf /usr/lib/junk

  5. # rm -rf /usr/lib/junk rm: cannot remove `/junk': No such

    file or directory
  6. # rm -rf /usr/lib /junk rm: cannot remove `/junk': No

    such file or directory
  7. recovery

  8. #%@ !!! ☠✮ 1- swear alot

  9. 1- swear a lot 2- reinstall dpkg

  10. 1- swear a lot 2- reinstall dpkg 3- reinstall apt

  11. 1- swear a lot 2- reinstall dpkg 3- reinstall apt

    4- list installed packages
  12. 1- swear a lot 2- reinstall dpkg 3- reinstall apt

    4- list installed packages 5- reinstall all packages
  13. /bin /etc /home/francois /usr/bin /usr/lib

  14. safe-rm

  15. /usr/bin/rm

  16. PATH="/usr/bin:/bin"

  17. /bin/rm -rf /usr/lib

  18. # rm -rf /usr/lib

  19. # rm -rf /usr/lib safe-rm: skipping /usr/lib

  20. /bin /boot /dev /etc /home /initrd /lib /proc /root /sbin

    /sys /usr /usr/bin /usr/include /usr/lib /usr/local /usr/local/bin /usr/local/include /usr/local/sbin /usr/local/share /usr/sbin /usr/share /usr/src /var
  21. /etc/safe-rm.conf ~/.safe-rm

  22. apt-get install safe-rm

  23. https://launchpad.net/safe-rm THE END Copyright © 2014 François Marier <francois@debian.org> This

    work is licensed under a Creative Commons Attribution-ShareAlike 4.0 License.