How not to delete your important files

23
N o .43 HOW NOT TO DELETE YOUR IMPORTANT FILES François Marier <[email protected]>

description

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

Transcript of How not to delete your important files

Page 1: How not to delete your important files

No.43 HOW NOT TO DELETEYOUR IMPORTANT FILES

François Marier <[email protected]>

Page 2: How not to delete your important files

tl;dr

apt-get install safe-rm

Page 3: How not to delete your important files

story

Page 4: How not to delete your important files

$ rm -rf /usr/lib/junk

Page 5: How not to delete your important files

$ rm -rf /usr/lib/junkrm: cannot remove `/junk':No such file or directory

Page 6: How not to delete your important files

$ rm -rf /usr/lib /junkrm: cannot remove `/junk':No such file or directory

Page 7: How not to delete your important files

recovery

Page 8: How not to delete your important files

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

Page 9: How not to delete your important files

1- swear a lot

2- reinstall dpkg

Page 10: How not to delete your important files

1- swear a lot

2- reinstall dpkg

3- reinstall apt

Page 11: How not to delete your important files

1- swear a lot

2- reinstall dpkg

3- reinstall apt

4- list installed packages

Page 12: How not to delete your important files

1- swear a lot

2- reinstall dpkg

3- reinstall apt

4- list installed packages

5- reinstall all packages

Page 13: How not to delete your important files

/bin/etc/home/francois/usr/bin/usr/lib

Page 14: How not to delete your important files

safe-rm

Page 15: How not to delete your important files

/usr/bin/rm

Page 16: How not to delete your important files

PATH="/usr/bin:/bin"

Page 17: How not to delete your important files

/bin/rm -rf /usr/lib

Page 18: How not to delete your important files

$ rm -rf /usr/lib

Page 19: How not to delete your important files

$ rm -rf /usr/libsafe-rm: skipping /usr/lib

Page 20: How not to delete your important files

/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

Page 21: How not to delete your important files

/etc/safe-rm.conf

~/.safe-rm

Page 22: How not to delete your important files

apt-get install safe-rm

Page 23: How not to delete your important files

www.safe-rm.org.nz

THE END

Copyright © 2012 François Marier <[email protected]>This work is licensed under a Creative Commons

Attribution-ShareAlike 3.0 Unported License.