ALT Linux sysadmins discussion
 help / color / mirror / Atom feed
* [Sysadmins] Fwd: [nixCraft] New Comment On: My 10 UNIX Command Line Mistakes
@ 2012-08-14  9:13 Michael Shigorin
  2012-08-14  9:33 ` Sergei Epiphanov
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Shigorin @ 2012-08-14  9:13 UTC (permalink / raw)
  To: sysadmins

	Здравствуйте.
Про "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/


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Sysadmins] Fwd: [nixCraft] New Comment On: My 10 UNIX Command Line Mistakes
  2012-08-14  9:13 [Sysadmins] Fwd: [nixCraft] New Comment On: My 10 UNIX Command Line Mistakes Michael Shigorin
@ 2012-08-14  9:33 ` Sergei Epiphanov
  0 siblings, 0 replies; 2+ messages in thread
From: Sergei Epiphanov @ 2012-08-14  9:33 UTC (permalink / raw)
  To: sysadmins

On 14 августа 2012 12:13 Michael Shigorin wrote:
> Про "touch 0; chmod 0 0" для защиты каталогов от случайного rm
> понравилось, хоть и опять не панацея  (нечего было делать
> alias на rm -r, а если бы -rf, то и хитрость бы не сработала)

Проще и брутальнее 'chattr +i' на нужное. :)

-- 
С уважением, Епифанов Сергей

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-08-14  9:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-14  9:13 [Sysadmins] Fwd: [nixCraft] New Comment On: My 10 UNIX Command Line Mistakes Michael Shigorin
2012-08-14  9:33 ` Sergei Epiphanov

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