3 ms·
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 lea
by there 16y ago
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 ">!".
- gnosis 16y agoIt'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.