[Sysadmins] Fwd: [nixCraft] New Comment On: My 10 UNIX Command Line Mistakes

Michael Shigorin mike на osdn.org.ua
Вт Авг 14 13:13:50 MSK 2012

Про "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". 

Author: okobaka
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:

----- End forwarded message -----

 ---- WBR, Michael Shigorin <mike на altlinux.ru>
  ------ Linux.Kiev http://www.linux.kiev.ua/

Подробная информация о списке рассылки Sysadmins