From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on sa.int.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.5 Date: Tue, 14 Aug 2012 12:13:50 +0300 From: Michael Shigorin To: sysadmins@lists.altlinux.org Message-ID: <20120814091350.GR4053@osdn.org.ua> Mail-Followup-To: sysadmins@lists.altlinux.org Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.4.2.1i Subject: [Sysadmins] Fwd: [nixCraft] New Comment On: My 10 UNIX Command Line Mistakes X-BeenThere: sysadmins@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: shigorin@gmail.com, ALT Linux sysadmins' discussion List-Id: ALT Linux sysadmins' discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2012 09:13:55 -0000 Archived-At: List-Archive: Здравствуйте. Про "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 ------ Linux.Kiev http://www.linux.kiev.ua/