Surf’s Up @ AEAF

On Wednesday, November 14th I’ll be presenting a detailed look at the making of Surf’s Up at the Australian Effects and Animation festival. If you’re going to be near Sydney this November you might want to include AEAF in your plans–this has been an excellent conference in the past and it looks like another great lineup this year as well.

AEAF attendees or others with interest can download the referenced course notes from Sony Imageworks [14.3 Mb PDF].

Unix Shortcuts

Copy files with tar, this preserves time/date stamps and permissions nicely.

tar cf - * | ( cd /target; tar xfp -)

Backup and a restore a mySql database:

mysqldump -u username -ppassword database_name > FILE.sql
 mysql -u username -ppassword database_name < FILE.sql

List the most visted IP addresses in a default Apache access.log:

less access.log | cut -d '-' -f 1 | sort -r | uniq -c | sort -gr | head -20

Figure out which process is “grabbing” a drive you want to unmount (from Donncha):

# umount /media/disk/
umount: /media/disk: device is busy
# fuser -m /dev/sdc1
/dev/sdc1: 538
# ps auxw| grep 538
donncha 538 0.4 2.7 219212 56792 ? SLl Feb11 11:25 rhythmbox

Sometimes when pasting code in vi, it over-indents. has the answer for this:

> All you need to do is "set paste", then paste your stuff, and then "set nopaste" again.

Want to move a bunch of mysql databases from one server to another in one line? Yes you do, and thanks to Marcus here’s how:

mysqldump -u root -pPASSWORD --all-databases | ssh USER@NEW.HOST.COM 'cat - | mysql -u root -pPASSWORD

That’s all so far.