Upload to an Arduino from the command line
The arduino IDE resets the attached arduino before running avrdude. It does this by telling the FTDI device to pulse the DTR line which is attached to the arduino's reset pin. Pekkaa found the example perl code which does this and updated the thread on the Arduino forums.

For completeness here is the command they used to upload the .hex file:

perl -MDevice::SerialPort -e 'Device::SerialPort-&gt;new("/dev/ttyUSB0")-&gt;pulse_dtr_on(1000)'; \
./hardware/tools/avrdude -Chardware/tools/avrdude.conf -q -q -pm328p -cstk500v1 -P/dev/ttyUSB0 -b57600 -D -Uflash:w:/home/pekka/sketchbook/Blink2/applet/Blink2.hex;


There is also a python script for reseting arduinos which can be used in place of the perl one if you have trouble getting it to work on your system.