For systems w/o 'timeout', and unless you know what traffic rate you have (check 'man tcpdump' for
capture size), here's another easy way:
Code:
/path/to/tcpdumpbinary --whatever-args-you-need &
sleep 10s && pkill -HUP -f /path/to/tcpdumpbinary
* If you aim for longer capture durations there's also the 'at' service:
Code:
echo "/path/to/tcpdumpbinary --whatever-args-you-need"|/usr/bin/at now
echo "pkill -HUP -f /path/to/tcpdumpbinary"|/usr/bin/at now +30 minutes