Greetings, I just started using scripting languages,
im trying to get a tcpdump in a file, change the
file name every 5mins ... this is what i have but its
not working ... any suggestions?
#!/bin/bash
# timeout.sh
#timestamp format
TIMESTAMP=`date -u "+%Y%m%dT%H%M%S"`
#tdump =`tcpdump -w dump.out -s 1514`
#tcpdump -w dump.out -s 1514 &
while sleep 2
do
echo starting tcpdump
#tcpdump -w dump.out -s 1514
tcpdump -s 5060 > dump.out
mv dump.out dump.out_${TIMESTAMP}
echo file output is dump.out_${TIMESTAMP}
done