[nycbug-talk] fave BSD tips/tricks?
Max Gribov
max at neuropunks.org
Thu Aug 27 09:31:54 EDT 2009
Dru Lavigne wrote:
> I'm finishing up an article for BSD mag on BSD tips and tricks. Anyone have a favourite tip or trick they'd like to see in this article?
>
>
some random shell scripts i have laying around, hardly bsd specific, but
pretty useful (and probably pretty well known)
delete all mail for specific email address in postfix queue:
for i in $(postqueue -p|grep email at domain.com|awk '{print $1}'|cut -c
1-10); do postsuper -d $i; done
mysql full backup over ssh/mysqldump:
mysqldump -u root --add-drop-table --complete-insert --password="pass"
--all-databases |ssh rsync at host "cat > /backup/mysql_all.sql"
symon/symux are excellent for machine usage graphing (its in ports)
create and maintain a dynamic ip to a hostname mapping (you have to
generate keys for bind first):
#!/bin/sh
cd /root/nsupdate
ip=`/sbin/ifconfig dc0|grep inet|awk '{print $2}'`
nsupdate -k Kkey.domain.com.+157+55946.private <<EOF
server ns1.domain.com
zone domain.com
update delete myhost.domain.com. A
update add myhost.domain.com. 3600 A $ip
send
EOF
> Cheers,
>
> Dru
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> talk mailing list
> talk at lists.nycbug.org
> http://lists.nycbug.org/mailman/listinfo/talk
>
More information about the talk
mailing list