Download:
avrdude \
-c <programmer type> \
-P <connection port> \
-b <override RS-232 baudrate> \
-p <partno, AVR device> \
-U <memtype>:r:file_name[:format]
Upload:
Use w (write) instead of r (read) for the -U option.
More details at manual - avrdude Option-Descriptions.
Example:
Download UNO v3 (ATmega328) flash ROM (bootloader) given port /dev/ttyACM0 as Intel HEX:
avrdude -c arduino -P /dev/ttyACM0 -b 115200 -p m328p -U flash:r:SaveFlash.hex:i
If used directly from from the arduino IDE archive also add:
-C path-to/arduino-V/hardware/tools/avr/etc/avrdude.conf