Здравствуйте. Про "touch 0; chmod 0 0" для защиты каталогов от случайного rm понравилось, хоть и опять не панацея :) (нечего было делать alias на rm -r, а если бы -rf, то и хитрость бы не сработала)
----- Forwarded message from Webmaster nixCraft ----- There is a new comment on the post "My 10 UNIX Command Line Mistakes". http://www.cyberciti.biz/tips/my-10-unix-command-line-mistakes.html Author: okobaka Comment: 1. alt+f4 on putty hurts 2. `rm cd /path/to/dir` # someone called me on the cell while executing rm and after that i typed cp /path/to/dir (alias rm -r) 3. again rm dots, stars, spaces and other weird stuff with char coding ctrl+c and ctrl+z is your friend My way to prevent rm was `touch 0; chmod 000 0` in directory i want to protect. Secret zero file. Same with: * remote mistakes, iptables, ifconfig, route, dhcpd. * partitioning (you want write to disc? yes, oh no no no ... ), cfdisk, MBR, lilo * cat binary files, forced me to drop a shell because i didn't know about reset/restart * wrong umask in root profile, as root chown or chmod -R /home/user/, hip hip horray for symlinks, * remote rsync * Whats going on? Something is not working? Why i cant do that? lets reboot - never reboot when something is cooking. First check if you have enough space to write your damn files on partition! Permissions and so on ... ... for sure i did more. I would like to say now i'm fine with mistakes because of double check everything, but that rm pissed me today, i'm going to block some arguments to rm - damn it. Nothing important was lost. See all comments on this post here: http://www.cyberciti.biz/tips/my-10-unix-command-line-mistakes.html#comments ----- End forwarded message ----- -- ---- WBR, Michael Shigorin <[email protected]> ------ Linux.Kiev http://www.linux.kiev.ua/ _______________________________________________ Sysadmins mailing list [email protected] https://lists.altlinux.org/mailman/listinfo/sysadmins
