From: Michael Shigorin <mike@osdn.org.ua>
To: sysadmins@lists.altlinux.org
Subject: [Sysadmins] Fwd: [nixCraft] New Comment On: My 10 UNIX Command Line Mistakes
Date: Tue, 14 Aug 2012 12:13:50 +0300
Message-ID: <20120814091350.GR4053@osdn.org.ua> (raw)
Здравствуйте.
Про "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 <mike@altlinux.ru>
------ Linux.Kiev http://www.linux.kiev.ua/
next reply other threads:[~2012-08-14 9:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-14 9:13 Michael Shigorin [this message]
2012-08-14 9:33 ` Sergei Epiphanov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120814091350.GR4053@osdn.org.ua \
--to=mike@osdn.org.ua \
--cc=shigorin@gmail.com \
--cc=sysadmins@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux sysadmins discussion
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/sysadmins/0 sysadmins/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 sysadmins sysadmins/ http://lore.altlinux.org/sysadmins \
sysadmins@lists.altlinux.org sysadmins@lists.altlinux.ru sysadmins@lists.altlinux.com
public-inbox-index sysadmins
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.sysadmins
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git