News for hackers. Stuff that matters.
Re:My 10 UNIX Command Line Mistakes by there on Sunday February 27, 2011 @01:03PM (#2268371)
I wanted to append a new zone to /var/named/chroot/etc/named.conf file., but end up running:

./mkzone example.com > /var/named/chroot/etc/named.conf

in at least tcsh, "set noclobber" will help with this. when you try to overwrite a file that exists (usually from doing > instead of >>) you will get an error that the file exists instead. if you really want to overwrite the file, you have to use ">!".

Re:My 10 UNIX Command Line Mistakes by gnosis on Sunday February 27, 2011 @01:13PM (#2268401)
It's similar in zsh. Unless CLOBBER is set, you need to use ">!" or ">|" to overwrite a file when redirecting output.

A nice safety feature that's already saved my bacon.